pub enum ASN1Type {
Show 22 variants
Null,
Boolean(Boolean),
Integer(Integer),
Real(Real),
BitString(BitString),
OctetString(OctetString),
CharacterString(CharacterString),
Enumerated(Enumerated),
Choice(Choice),
Sequence(SequenceOrSet),
SequenceOf(SequenceOrSetOf),
Set(SequenceOrSet),
SetOf(SequenceOrSetOf),
Time(Time),
GeneralizedTime(GeneralizedTime),
UTCTime(UTCTime),
ElsewhereDeclaredType(DeclarationElsewhere),
ChoiceSelectionType(ChoiceSelectionType),
ObjectIdentifier(ObjectIdentifier),
InformationObjectFieldReference(InformationObjectFieldReference),
EmbeddedPdv,
External,
}
Expand description
The possible types of an ASN1 data element.
In addition, the ElsewhereDeclaredType
enumeral denotes an type
specified in the same or an imported ASN1 specification.
Variants§
Null
Boolean(Boolean)
Integer(Integer)
Real(Real)
BitString(BitString)
OctetString(OctetString)
CharacterString(CharacterString)
Enumerated(Enumerated)
Choice(Choice)
Sequence(SequenceOrSet)
SequenceOf(SequenceOrSetOf)
Set(SequenceOrSet)
SetOf(SequenceOrSetOf)
Time(Time)
GeneralizedTime(GeneralizedTime)
UTCTime(UTCTime)
ElsewhereDeclaredType(DeclarationElsewhere)
ChoiceSelectionType(ChoiceSelectionType)
ObjectIdentifier(ObjectIdentifier)
InformationObjectFieldReference(InformationObjectFieldReference)
EmbeddedPdv
External
Implementations§
Source§impl ASN1Type
impl ASN1Type
pub fn as_str(&self) -> Cow<'_, str>
pub fn builtin_or_elsewhere( parent: Option<&str>, identifier: &str, constraints: Option<Vec<Constraint>>, ) -> ASN1Type
pub fn is_builtin_type(&self) -> bool
pub fn constraints(&self) -> Option<&Vec<Constraint>>
pub fn constraints_mut(&mut self) -> Option<&mut Vec<Constraint>>
Source§impl ASN1Type
impl ASN1Type
Sourcepub fn collect_supertypes(
&mut self,
tlds: &BTreeMap<String, ToplevelDefinition>,
) -> Result<(), GrammarError>
pub fn collect_supertypes( &mut self, tlds: &BTreeMap<String, ToplevelDefinition>, ) -> Result<(), GrammarError>
Collects supertypes of ASN1 values.
In ToplevelTypeDefinition
s, values will appear only as DEFAULT
values in SET
s or SEQUENCE
s.
pub fn has_choice_selection_type(&self) -> bool
pub fn link_choice_selection_type( &mut self, tlds: &BTreeMap<String, ToplevelDefinition>, ) -> Result<(), GrammarError>
pub fn contains_components_of_notation(&self) -> bool
pub fn link_components_of_notation( &mut self, tlds: &BTreeMap<String, ToplevelDefinition>, ) -> bool
pub fn link_constraint_reference( &mut self, name: &String, tlds: &BTreeMap<String, ToplevelDefinition>, ) -> Result<Option<ASN1Type>, GrammarError>
Sourcepub fn mark_recursive(
&mut self,
name: &str,
) -> Result<Vec<Cow<'_, str>>, GrammarError>
pub fn mark_recursive( &mut self, name: &str, ) -> Result<Vec<Cow<'_, str>>, GrammarError>
Traverses type and marks if recursive. Returns a vector of traversed type IDs since the last recursion detection or the leaf type.
pub fn contains_constraint_reference(&self) -> bool
pub fn references_class_by_name(&self) -> bool
pub fn resolve_class_reference( self, tlds: &BTreeMap<String, ToplevelDefinition>, ) -> Self
pub fn link_subtype_constraint( &mut self, tlds: &BTreeMap<String, ToplevelDefinition>, ) -> Result<(), GrammarError>
Trait Implementations§
Source§impl From<ASN1Type> for ContentConstraint
impl From<ASN1Type> for ContentConstraint
impl StructuralPartialEq for ASN1Type
Auto Trait Implementations§
impl Freeze for ASN1Type
impl RefUnwindSafe for ASN1Type
impl Send for ASN1Type
impl Sync for ASN1Type
impl Unpin for ASN1Type
impl UnwindSafe for ASN1Type
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
)