Trait miden_objects::assembly::Library
source · pub trait Library {
type ModuleIterator<'a>: Iterator<Item = &'a Module>
where Self: 'a;
// Required methods
fn root_ns(&self) -> &LibraryNamespace;
fn version(&self) -> &Version;
fn modules(&self) -> Self::ModuleIterator<'_>;
fn dependencies(&self) -> &[LibraryNamespace];
// Provided method
fn get_module_ast(&self, path: &LibraryPath) -> Option<&ModuleAst> { ... }
}Expand description
A library definition that provides AST modules for the compilation process.
Required Associated Types§
sourcetype ModuleIterator<'a>: Iterator<Item = &'a Module>
where
Self: 'a
type ModuleIterator<'a>: Iterator<Item = &'a Module> where Self: 'a
The concrete type used to iterate the modules of the library.
Required Methods§
sourcefn root_ns(&self) -> &LibraryNamespace
fn root_ns(&self) -> &LibraryNamespace
Returns the root namespace of this library.
sourcefn modules(&self) -> Self::ModuleIterator<'_>
fn modules(&self) -> Self::ModuleIterator<'_>
Iterate the modules available in the library.
sourcefn dependencies(&self) -> &[LibraryNamespace]
fn dependencies(&self) -> &[LibraryNamespace]
Returns the dependency libraries of this library.
Provided Methods§
sourcefn get_module_ast(&self, path: &LibraryPath) -> Option<&ModuleAst>
fn get_module_ast(&self, path: &LibraryPath) -> Option<&ModuleAst>
Returns the AST of the module stored at the provided path.
Object Safety§
This trait is not object safe.