pub struct ToplevelValueDefinition {
pub comments: String,
pub name: String,
pub associated_type: ASN1Type,
pub parameterization: Option<Parameterization>,
pub value: ASN1Value,
pub index: Option<(Rc<RefCell<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: ASN1Type
§parameterization: Option<Parameterization>
§value: ASN1Value
§index: Option<(Rc<RefCell<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 From<(Vec<&str>, &str, Option<Parameterization>, ASN1Type, ASN1Value)> for ToplevelValueDefinition
impl From<(Vec<&str>, &str, Option<Parameterization>, ASN1Type, ASN1Value)> for ToplevelValueDefinition
source§impl PartialEq for ToplevelValueDefinition
impl PartialEq for ToplevelValueDefinition
impl StructuralPartialEq for ToplevelValueDefinition
Auto Trait Implementations§
impl Freeze for ToplevelValueDefinition
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
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
)