[−][src]Struct wain_exec::Machine
Implementations
impl<'m, 's, I: Importer> Machine<'m, 's, I>
[src]
pub fn instantiate(module: &'m Module<'s>, importer: I) -> Result<Self>
[src]
Initialize states of execution (stack, memory, ...) and instantiate a given module. It means that 'start function' is invoked in this function if presents. The module is assumed to be validated. If an invalid module is given, the behavior is unspecified, meaning that it may crash or the result may be incorrect.
https://webassembly.github.io/spec/core/exec/modules.html#instantiation
pub fn module(&self) -> &'m Module<'s>
[src]
pub fn memory(&self) -> &Memory
[src]
pub fn get_global(&self, name: &str) -> Option<Value>
[src]
pub fn invoke(
&mut self,
name: impl AsRef<str>,
args: &[Value]
) -> Result<Option<Value>>
[src]
&mut self,
name: impl AsRef<str>,
args: &[Value]
) -> Result<Option<Value>>
Auto Trait Implementations
impl<'module, 'source, I> RefUnwindSafe for Machine<'module, 'source, I> where
I: RefUnwindSafe,
I: RefUnwindSafe,
impl<'module, 'source, I> Send for Machine<'module, 'source, I> where
I: Send,
I: Send,
impl<'module, 'source, I> Sync for Machine<'module, 'source, I> where
I: Sync,
I: Sync,
impl<'module, 'source, I> Unpin for Machine<'module, 'source, I> where
I: Unpin,
'source: 'module,
I: Unpin,
'source: 'module,
impl<'module, 'source, I> UnwindSafe for Machine<'module, 'source, I> where
I: UnwindSafe,
I: UnwindSafe,
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, 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>,