pub struct Instance<'module> { /* private fields */ }
Implementations§
Source§impl<'module> Instance<'module>
impl<'module> Instance<'module>
Sourcepub fn new(
runtime: &Runtime,
module: &'module Module<'module>,
stack_size: u32,
) -> Result<Self, RuntimeError>
pub fn new( runtime: &Runtime, module: &'module Module<'module>, stack_size: u32, ) -> Result<Self, RuntimeError>
Sourcepub fn new_with_args(
_runtime: &Runtime,
module: &'module Module<'module>,
stack_size: u32,
heap_size: u32,
) -> Result<Self, RuntimeError>
pub fn new_with_args( _runtime: &Runtime, module: &'module Module<'module>, stack_size: u32, heap_size: u32, ) -> Result<Self, RuntimeError>
instantiate a module with stack size and host managed heap size
heap_size is used for -nostdlib
Wasm and wasm32-unknown
§Error
Return RuntimeError::CompilationError
if failed.
pub fn get_inner_instance(&self) -> wasm_module_inst_t
Trait Implementations§
Auto Trait Implementations§
impl<'module> Freeze for Instance<'module>
impl<'module> RefUnwindSafe for Instance<'module>
impl<'module> !Send for Instance<'module>
impl<'module> !Sync for Instance<'module>
impl<'module> Unpin for Instance<'module>
impl<'module> UnwindSafe for Instance<'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