Struct rasn_compiler::intermediate::types::ChoiceOption
source · pub struct ChoiceOption {
pub name: String,
pub tag: Option<AsnTag>,
pub ty: ASN1Type,
pub constraints: Vec<Constraint>,
}
Expand description
Representation of an single ASN1 CHOICE option.
§Example
The ASN.1 CHOICE defined as
ⓘ
Test-Choice ::= CHOICE {
boolean-option [0] BOOLEAN
}
defines one option, which is representated as follows
ChoiceOption {
name: String::from("boolean-option"),
tag: Some(AsnTag {
environment: TaggingEnvironment::Automatic,
tag_class: TagClass::ContextSpecific,
id: 0,
}),
ty: ASN1Type::Boolean(Boolean {
constraints: vec![]
}),
constraints: vec![]
}
Fields§
§name: String
§tag: Option<AsnTag>
§ty: ASN1Type
§constraints: Vec<Constraint>
Trait Implementations§
source§impl Clone for ChoiceOption
impl Clone for ChoiceOption
source§fn clone(&self) -> ChoiceOption
fn clone(&self) -> ChoiceOption
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for ChoiceOption
impl Debug for ChoiceOption
source§impl PartialEq for ChoiceOption
impl PartialEq for ChoiceOption
source§fn eq(&self, other: &ChoiceOption) -> bool
fn eq(&self, other: &ChoiceOption) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for ChoiceOption
Auto Trait Implementations§
impl RefUnwindSafe for ChoiceOption
impl Send for ChoiceOption
impl Sync for ChoiceOption
impl Unpin for ChoiceOption
impl UnwindSafe for ChoiceOption
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more