[][src]Struct wasmer_runtime::DynFunc

pub struct DynFunc<'a> { /* fields omitted */ }

A representation of an exported WebAssembly function.

Methods

impl<'a> DynFunc<'a>[src]

pub fn call(&self, params: &[Value]) -> Result<Vec<Value>, CallError>[src]

Call an exported WebAssembly function safely.

Pass arguments by wrapping each one in the Value enum. The returned values are also each wrapped in a Value.

Note:

This returns CallResult<Vec<Value>> in order to support the future multi-value returns WebAssembly feature.

Usage:

instance
    .dyn_func("foo")?
    .call(&[])?;

pub fn signature(&self) -> &FuncSig[src]

pub fn raw(&self) -> *const Func[src]

Auto Trait Implementations

impl<'a> Unpin for DynFunc<'a>

impl<'a> !Sync for DynFunc<'a>

impl<'a> !Send for DynFunc<'a>

impl<'a> !RefUnwindSafe for DynFunc<'a>

impl<'a> !UnwindSafe for DynFunc<'a>

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Erased for T