pub struct ChoiceOption {
pub name: String,
pub tag: Option<AsnTag>,
pub ty: ASN1Type,
pub constraints: Vec<Constraint>,
pub is_recursive: bool,
}
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"),
is_recursive: false,
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>
§is_recursive: bool
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
impl StructuralPartialEq for ChoiceOption
Auto Trait Implementations§
impl Freeze for ChoiceOption
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)