pub struct NativeModule {
pub functions: Vec<NativeFunc>,
pub globals: Vec<(String, NativeType, Option<i64>)>,
pub extern_fns: Vec<(String, Vec<NativeType>, NativeType)>,
pub name: String,
}Expand description
A compiled native module.
Fields§
§functions: Vec<NativeFunc>Functions in this module.
globals: Vec<(String, NativeType, Option<i64>)>Global variables.
extern_fns: Vec<(String, Vec<NativeType>, NativeType)>External function declarations.
name: StringModule name.
Implementations§
Source§impl NativeModule
impl NativeModule
Sourcepub fn total_instructions(&self) -> usize
pub fn total_instructions(&self) -> usize
Total number of instructions in the module.
Sourcepub fn get_function(&self, name: &str) -> Option<&NativeFunc>
pub fn get_function(&self, name: &str) -> Option<&NativeFunc>
Find a function by name.
Trait Implementations§
Source§impl Clone for NativeModule
impl Clone for NativeModule
Source§fn clone(&self) -> NativeModule
fn clone(&self) -> NativeModule
Returns a duplicate 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 NativeModule
impl Debug for NativeModule
Auto Trait Implementations§
impl Freeze for NativeModule
impl RefUnwindSafe for NativeModule
impl Send for NativeModule
impl Sync for NativeModule
impl Unpin for NativeModule
impl UnsafeUnpin for NativeModule
impl UnwindSafe for NativeModule
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