pub struct SequenceOrSetMember {
pub name: String,
pub tag: Option<AsnTag>,
pub ty: ASN1Type,
pub default_value: Option<ASN1Value>,
pub is_optional: bool,
pub is_recursive: bool,
pub constraints: Vec<Constraint>,
}
Expand description
Representation of an single ASN1 SEQUENCE or SET member.
§Example
The ASN.1 SEQUENCE defined as
ⓘ
Test-Sequence ::= SEQUENCE {
int-member [0] INTEGER (0..2) DEFAULT 1
}
defines one member, which is representated as follows
SequenceOrSetMember {
is_recursive: false,
name: String::from("int-member"),
tag: Some(AsnTag {
environment: TaggingEnvironment::Automatic,
tag_class: TagClass::ContextSpecific,
id: 0,
}),
ty: ASN1Type::Integer(Integer {
constraints: vec![
Constraint::SubtypeConstraint(ElementSet {
set: ElementOrSetOperation::Element(SubtypeElement::ValueRange {
min: Some(ASN1Value::Integer(0)),
max: Some(ASN1Value::Integer(2)),
extensible: false
}),
extensible: false
})
],
distinguished_values: None,
}),
default_value: Some(ASN1Value::Integer(1)),
is_optional: true,
constraints: vec![]
}
Fields§
§name: String
§tag: Option<AsnTag>
§ty: ASN1Type
§default_value: Option<ASN1Value>
§is_optional: bool
§is_recursive: bool
§constraints: Vec<Constraint>
Trait Implementations§
source§impl Clone for SequenceOrSetMember
impl Clone for SequenceOrSetMember
source§fn clone(&self) -> SequenceOrSetMember
fn clone(&self) -> SequenceOrSetMember
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 SequenceOrSetMember
impl Debug for SequenceOrSetMember
source§impl From<(&str, Option<AsnTag>, ASN1Type, Option<Vec<Constraint>>, Option<OptionalMarker>, Option<ASN1Value>)> for SequenceOrSetMember
impl From<(&str, Option<AsnTag>, ASN1Type, Option<Vec<Constraint>>, Option<OptionalMarker>, Option<ASN1Value>)> for SequenceOrSetMember
source§impl PartialEq for SequenceOrSetMember
impl PartialEq for SequenceOrSetMember
impl StructuralPartialEq for SequenceOrSetMember
Auto Trait Implementations§
impl Freeze for SequenceOrSetMember
impl RefUnwindSafe for SequenceOrSetMember
impl Send for SequenceOrSetMember
impl Sync for SequenceOrSetMember
impl Unpin for SequenceOrSetMember
impl UnwindSafe for SequenceOrSetMember
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
)