pub struct ToplevelValueDefinition {
pub comments: String,
pub name: String,
pub associated_type: String,
pub value: ASN1Value,
pub index: Option<(Rc<ModuleReference>, usize)>,
}
Expand description
Represents a top-level definition of a value using a custom or built-in ASN.1 type.
Fields§
§comments: String
§name: String
§associated_type: String
§value: ASN1Value
§index: Option<(Rc<ModuleReference>, usize)>
Implementations§
source§impl ToplevelValueDefinition
impl ToplevelValueDefinition
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 and implicit supertypes of an ASN1 value that are not straightforward to parse on first pass
§Example
exmpleValue
’s supertypes would be “ExampleType”, “OuterExampleType”, and “RootType”
ⓘ
ExampleType ::= OuterExampleType (2..8)
OuterExampleType ::= RootType
RootType ::= INTEGER
exampleValue ExampleType ::= 6
The supertypes are recorded in a LinkedASN1Value
Trait Implementations§
source§impl Clone for ToplevelValueDefinition
impl Clone for ToplevelValueDefinition
source§fn clone(&self) -> ToplevelValueDefinition
fn clone(&self) -> ToplevelValueDefinition
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 ToplevelValueDefinition
impl Debug for ToplevelValueDefinition
source§impl PartialEq for ToplevelValueDefinition
impl PartialEq for ToplevelValueDefinition
source§fn eq(&self, other: &ToplevelValueDefinition) -> bool
fn eq(&self, other: &ToplevelValueDefinition) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for ToplevelValueDefinition
Auto Trait Implementations§
impl RefUnwindSafe for ToplevelValueDefinition
impl !Send for ToplevelValueDefinition
impl !Sync for ToplevelValueDefinition
impl Unpin for ToplevelValueDefinition
impl UnwindSafe for ToplevelValueDefinition
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