pub struct Module {
pub functions: HashMap<String, Function>,
pub data: HashMap<String, AbiType>,
}
Fields§
§functions: HashMap<String, Function>
A list of functions defined in the module.
data: HashMap<String, AbiType>
A list of global data variables declared in the module.
Implementations§
Source§impl Module
impl Module
Sourcepub fn declare_function(&mut self, name: String)
pub fn declare_function(&mut self, name: String)
Declares a function with the specified name.
Sourcepub fn define_function(&mut self, func: Function)
pub fn define_function(&mut self, func: Function)
Defines a function with the specified name.
Sourcepub fn declare_variable(
&mut self,
name: String,
val_type: AbiType,
) -> GlobalVariable
pub fn declare_variable( &mut self, name: String, val_type: AbiType, ) -> GlobalVariable
Declares a variable in the module.
Auto Trait Implementations§
impl Freeze for Module
impl RefUnwindSafe for Module
impl Send for Module
impl Sync for Module
impl Unpin for Module
impl UnwindSafe for Module
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