pub struct State { /* private fields */ }
Expand description
VM State - Immutable, only changes when loading a module.
Implementations§
Source§impl State
impl State
pub fn new() -> State
pub fn load_file( &mut self, name: &str, file: &str, ) -> Result<ModuleInstanceAddr>
pub fn get_function(&self, addr: FuncAddr) -> Trap<&Function>
pub fn get_exported(&self, module: &str, name: &str) -> Result<FuncAddr>
pub fn invoke_function( &self, store: &mut Store, func_addr: FuncAddr, ) -> Trap<Option<StackValue>>
pub fn call( &self, store: &mut Store, func_addr: FuncAddr, params: &[Value], ) -> Result<RetValue>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for State
impl !RefUnwindSafe for State
impl !Send for State
impl !Sync for State
impl Unpin for State
impl !UnwindSafe for State
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