pub trait WasmInstance: Send {
// Required methods
fn call(
&self,
method: InvokeMethod<'_>,
data: &[u8],
) -> Result<Vec<u8>, Error>;
fn get_global_const(&self, name: &str) -> Result<Option<Value>, Error>;
// Provided method
fn call_export(&self, method: &str, data: &[u8]) -> Result<Vec<u8>, Error> { ... }
}Expand description
A trait that defines an abstract wasm module instance.
This can be implemented by an execution engine.
Required Methods§
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".