Struct rasn_compiler::intermediate::types::SequenceOrSetOf
source · pub struct SequenceOrSetOf {
pub constraints: Vec<Constraint>,
pub element_type: Box<ASN1Type>,
}
Expand description
Representation of an ASN1 SEQUENCE OF and SET OF data element
with corresponding constraints and element type info
Whether the struct describes a SEQUENCE OF or a SET OF
is identified by the ASN1Type
enum variant that
holds this struct as a value (i.e. ASN1Type::SetOf(SequenceOrSetOf { .. })
or ASN1Type::SequenceOf(SequenceOrSetOf { .. })
).
As defined in Rec. ITU-T X.680 (02/2021) §26 and §28
Fields§
§constraints: Vec<Constraint>
§element_type: Box<ASN1Type>
ASN.1 type of the individual elements of the collection
§Example
The ASN.1 type
ⓘ
Sequence-of-booleans ::= SEQUENCE OF BOOLEAN
will have an element_type
field of
Box::new(ASN1Type::Boolean(Boolean { constraints: vec![] } ))
Trait Implementations§
source§impl Clone for SequenceOrSetOf
impl Clone for SequenceOrSetOf
source§fn clone(&self) -> SequenceOrSetOf
fn clone(&self) -> SequenceOrSetOf
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 Constrainable for SequenceOrSetOf
impl Constrainable for SequenceOrSetOf
source§fn constraints(&self) -> &Vec<Constraint>
fn constraints(&self) -> &Vec<Constraint>
returns a reference to the type’s constraints
source§fn constraints_mut(&mut self) -> &mut Vec<Constraint>
fn constraints_mut(&mut self) -> &mut Vec<Constraint>
returns a mutable reference to the type’s constraints
source§impl Debug for SequenceOrSetOf
impl Debug for SequenceOrSetOf
source§impl From<(Option<Vec<Constraint>>, ASN1Type)> for SequenceOrSetOf
impl From<(Option<Vec<Constraint>>, ASN1Type)> for SequenceOrSetOf
source§impl PartialEq for SequenceOrSetOf
impl PartialEq for SequenceOrSetOf
source§fn eq(&self, other: &SequenceOrSetOf) -> bool
fn eq(&self, other: &SequenceOrSetOf) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for SequenceOrSetOf
Auto Trait Implementations§
impl RefUnwindSafe for SequenceOrSetOf
impl Send for SequenceOrSetOf
impl Sync for SequenceOrSetOf
impl Unpin for SequenceOrSetOf
impl UnwindSafe for SequenceOrSetOf
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