[−][src]Struct wasmtime_interface_types::ModuleData
A data structure intended to hold a parsed representation of the wasm interface types of a module.
The expected usage pattern is to create this next to wasmtime data structures and then use this to process arguments into wasm arguments as appropriate for bound functions.
Methods
impl ModuleData
[src]
pub fn new(wasm: &[u8]) -> Result<ModuleData>
[src]
Parses a raw binary wasm file, extracting information about wasm interface types.
Returns an error if the wasm file is malformed.
pub fn find_wasi_module_name(&self) -> Option<String>
[src]
Detects if WASI support is needed: returns module name that is requested.
pub fn invoke_export(
&self,
instance: &Instance,
export: &str,
args: &[Value]
) -> Result<Vec<Value>>
[src]
&self,
instance: &Instance,
export: &str,
args: &[Value]
) -> Result<Vec<Value>>
Invokes wasmtime function with a &[Value]
list. Value
the set of
wasm interface types.
pub fn binding_for_export(
&self,
instance: &mut InstanceHandle,
name: &str
) -> Result<ExportBinding>
[src]
&self,
instance: &mut InstanceHandle,
name: &str
) -> Result<ExportBinding>
Returns an appropriate binding for the name
export in this module
which has also been instantiated as instance
provided here.
Returns an error if name
is not present in the module.
Auto Trait Implementations
impl !RefUnwindSafe for ModuleData
impl Send for ModuleData
impl Sync for ModuleData
impl Unpin for ModuleData
impl !UnwindSafe for ModuleData
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,