pub struct Module<'a> {
pub type_declarations: HashMap<&'a str, TypeDeclaration<'a>>,
pub global_declarations: HashMap<&'a str, GlobalDeclaration<'a>>,
pub functions: HashMap<&'a str, Function<'a>>,
}Fields§
§type_declarations: HashMap<&'a str, TypeDeclaration<'a>>Named type declarations in this module
Using a HashMap enables efficient lookup by type name. The order of type declarations is not preserved, but this is typically not critical.
global_declarations: HashMap<&'a str, GlobalDeclaration<'a>>Global variable declarations in this module
Global variables are module-level data that persists for the lifetime of the program. They can be initialized with constant values.
functions: HashMap<&'a str, Function<'a>>Function definitions in this module
Functions contain the actual code of the module. They are organized by name for fast lookup during function calls.
Implementations§
Trait Implementations§
impl<'a> StructuralPartialEq for Module<'a>
Auto Trait Implementations§
impl<'a> Freeze for Module<'a>
impl<'a> RefUnwindSafe for Module<'a>
impl<'a> Send for Module<'a>
impl<'a> Sync for Module<'a>
impl<'a> Unpin for Module<'a>
impl<'a> UnsafeUnpin for Module<'a>
impl<'a> UnwindSafe for Module<'a>
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