pub trait AsInstance {
Show 13 methods // Required methods fn name(&self) -> &str; fn func_count(&self) -> usize; fn func_names(&self) -> Option<Vec<String>>; fn func(&self, name: impl AsRef<str>) -> WasmEdgeResult<Func>; fn global_count(&self) -> usize; fn global_names(&self) -> Option<Vec<String>>; fn global(&self, name: impl AsRef<str>) -> WasmEdgeResult<Global>; fn memory_count(&self) -> usize; fn memory_names(&self) -> Option<Vec<String>>; fn memory(&self, name: impl AsRef<str>) -> WasmEdgeResult<Memory>; fn table_count(&self) -> usize; fn table_names(&self) -> Option<Vec<String>>; fn table(&self, name: impl AsRef<str>) -> WasmEdgeResult<Table>;
}
Expand description

The object used as an module instance is required to implement this trait.

Required Methods§

source

fn name(&self) -> &str

Returns the name of this exported module instance.

source

fn func_count(&self) -> usize

Returns the count of the exported function instances in this module instance.

source

fn func_names(&self) -> Option<Vec<String>>

Returns the names of the exported function instances in this module instance.

source

fn func(&self, name: impl AsRef<str>) -> WasmEdgeResult<Func>

Returns the exported function instance in this module instance.

Argument
source

fn global_count(&self) -> usize

Returns the count of the exported global instances.

source

fn global_names(&self) -> Option<Vec<String>>

Returns the names of the exported global instances in this module instance.

source

fn global(&self, name: impl AsRef<str>) -> WasmEdgeResult<Global>

Returns the exported global instance in this module instance.

Argument
source

fn memory_count(&self) -> usize

Returns the count of the exported memory instances in this module instance.

source

fn memory_names(&self) -> Option<Vec<String>>

Returns the names of the exported memory instances in this module instance.

source

fn memory(&self, name: impl AsRef<str>) -> WasmEdgeResult<Memory>

Returns the exported memory instance in this module instance.

Argument
source

fn table_count(&self) -> usize

Returns the count of the exported table instances in this module instance.

source

fn table_names(&self) -> Option<Vec<String>>

Returns the names of the exported table instances in this module instance.

source

fn table(&self, name: impl AsRef<str>) -> WasmEdgeResult<Table>

Returns the exported table instance in this module instance by the given table name.

Argument

Object Safety§

This trait is not object safe.

Implementors§