[][src]Struct wasm3::Function

pub struct Function<'rt, Args, Ret> { /* fields omitted */ }

A callable wasm3 function. This has a generic call function for up to 26 parameters emulating an overloading behaviour without having to resort to tuples. These are hidden to not pollute the documentation.

Implementations

impl<'rt, Args, Ret> Function<'rt, Args, Ret> where
    Args: WasmArgs,
    Ret: WasmType
[src]

pub fn import_module_name(&self) -> &str[src]

The name of the import module of this function.

pub fn name(&self) -> &str[src]

The name of this function.

impl<'rt, ARG, Ret> Function<'rt, ARG, Ret> where
    Ret: WasmType,
    ARG: WasmArg
[src]

pub fn call(&self, arg: ARG) -> Result<Ret>[src]

Calls this function with the given parameter. This is implemented with variable arguments depending on the functions Args type.

impl<'rt, Ret> Function<'rt, (), Ret> where
    Ret: WasmType
[src]

pub fn call(&self) -> Result<Ret>[src]

Calls this function. This is implemented with variable arguments depending on the functions Args type.

Trait Implementations

impl<'rt, Args: Clone, Ret: Clone> Clone for Function<'rt, Args, Ret>[src]

impl<'rt, Args: Copy, Ret: Copy> Copy for Function<'rt, Args, Ret>[src]

impl<'rt, Args: Debug, Ret: Debug> Debug for Function<'rt, Args, Ret>[src]

impl<'rt, Args, Ret> Eq for Function<'rt, Args, Ret>[src]

impl<'rt, Args, Ret> Hash for Function<'rt, Args, Ret>[src]

impl<'rt, Args, Ret> PartialEq<Function<'rt, Args, Ret>> for Function<'rt, Args, Ret>[src]

Auto Trait Implementations

impl<'rt, Args, Ret> !RefUnwindSafe for Function<'rt, Args, Ret>

impl<'rt, Args, Ret> !Send for Function<'rt, Args, Ret>

impl<'rt, Args, Ret> !Sync for Function<'rt, Args, Ret>

impl<'rt, Args, Ret> Unpin for Function<'rt, Args, Ret>

impl<'rt, Args, Ret> !UnwindSafe for Function<'rt, Args, Ret>

Blanket Implementations

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

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

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

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

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.