Struct wasmedge_sys::ImportModule
source · pub struct ImportModule { /* private fields */ }
Expand description
An ImportModule represents a host module with a name. A host module consists of one or more host function, table, memory, and global instances, which are defined outside wasm modules and fed into wasm modules as imports.
Implementations§
Trait Implementations§
source§impl AsImport for ImportModule
impl AsImport for ImportModule
source§fn add_func(&mut self, name: impl AsRef<str>, func: Function)
fn add_func(&mut self, name: impl AsRef<str>, func: Function)
Imports a host function instance. Read more
source§fn add_table(&mut self, name: impl AsRef<str>, table: Table)
fn add_table(&mut self, name: impl AsRef<str>, table: Table)
Imports a table instance. Read more
source§fn add_memory(&mut self, name: impl AsRef<str>, memory: Memory)
fn add_memory(&mut self, name: impl AsRef<str>, memory: Memory)
Imports a memory instance. Read more
source§fn add_global(&mut self, name: impl AsRef<str>, global: Global)
fn add_global(&mut self, name: impl AsRef<str>, global: Global)
Imports a global instance. Read more
source§impl Clone for ImportModule
impl Clone for ImportModule
source§fn clone(&self) -> ImportModule
fn clone(&self) -> ImportModule
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more