Struct asn1_compiler::Asn1Compiler
source · [−]pub struct Asn1Compiler { /* private fields */ }Expand description
ASN.1 Compiler Struct.
An application should create a Compiler Structure and will call Public API functions on the compiler.
Implementations
sourceimpl Asn1Compiler
impl Asn1Compiler
sourcepub fn new(
output: &str,
debug: bool,
visibility: &Visibility,
codecs: Vec<Codec>,
derives: Vec<Derive>
) -> Self
pub fn new(
output: &str,
debug: bool,
visibility: &Visibility,
codecs: Vec<Codec>,
derives: Vec<Derive>
) -> Self
Create a new Instance of the Compiler structure.
sourcepub fn add_module(&mut self, module: Asn1Module) -> bool
pub fn add_module(&mut self, module: Asn1Module) -> bool
Add a module to the list of known modules.
If the module alredy exists, returns false else returns true.
sourcepub fn resolve_modules(&mut self) -> Result<(), Error>
pub fn resolve_modules(&mut self) -> Result<(), Error>
Resolve Modules order and definitions within those modules.
First Makes sure that all the modules that have IMPORTs are indeed added to us. Then
definitions in each of the modules are ‘resolved’. Calls the Resolver functions to do
that. Modules are Topologically Sorted before they are resolved and definitions within
modules are topologically sorted as well. This makes Error handling for undefined
definitions much easier.
Trait Implementations
sourceimpl Debug for Asn1Compiler
impl Debug for Asn1Compiler
Auto Trait Implementations
impl RefUnwindSafe for Asn1Compiler
impl !Send for Asn1Compiler
impl !Sync for Asn1Compiler
impl Unpin for Asn1Compiler
impl UnwindSafe for Asn1Compiler
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more