Trait wasm_runtime_layer::backend::WasmInstance
source · pub trait WasmInstance<E: WasmEngine>: Clone + Sized + Send + Sync {
// Required methods
fn new(
store: impl AsContextMut<E>,
module: &E::Module,
imports: &Imports<E>
) -> Result<Self>;
fn exports(
&self,
store: impl AsContext<E>
) -> Box<dyn Iterator<Item = Export<E>>>;
fn get_export(
&self,
store: impl AsContext<E>,
name: &str
) -> Option<Extern<E>>;
}
Expand description
Provides an instantiated WASM module.
Required Methods§
sourcefn new(
store: impl AsContextMut<E>,
module: &E::Module,
imports: &Imports<E>
) -> Result<Self>
fn new( store: impl AsContextMut<E>, module: &E::Module, imports: &Imports<E> ) -> Result<Self>
Creates a new instance.
Object Safety§
This trait is not object safe.