Struct wasmer::NativeFunc[][src]

pub struct NativeFunc<Args = (), Rets = ()> { /* fields omitted */ }
Expand description

A WebAssembly function that can be called natively (using the Native ABI).

Implementations

impl<Rets> NativeFunc<(), Rets> where
    Rets: WasmTypeList
[src]

pub fn call(&self) -> Result<Rets, RuntimeError>[src]

Call the typed func and return results.

impl<A1, Rets> NativeFunc<A1, Rets> where
    A1: FromToNativeWasmType,
    Rets: WasmTypeList
[src]

pub fn call(&self, A1: A1) -> Result<Rets, RuntimeError>[src]

Call the typed func and return results.

impl<A1, A2, Rets> NativeFunc<(A1, A2), Rets> where
    A1: FromToNativeWasmType,
    A2: FromToNativeWasmType,
    Rets: WasmTypeList
[src]

pub fn call(&self, A1: A1, A2: A2) -> Result<Rets, RuntimeError>[src]

Call the typed func and return results.

impl<A1, A2, A3, Rets> NativeFunc<(A1, A2, A3), Rets> where
    A1: FromToNativeWasmType,
    A2: FromToNativeWasmType,
    A3: FromToNativeWasmType,
    Rets: WasmTypeList
[src]

pub fn call(&self, A1: A1, A2: A2, A3: A3) -> Result<Rets, RuntimeError>[src]

Call the typed func and return results.

impl<A1, A2, A3, A4, Rets> NativeFunc<(A1, A2, A3, A4), Rets> where
    A1: FromToNativeWasmType,
    A2: FromToNativeWasmType,
    A3: FromToNativeWasmType,
    A4: FromToNativeWasmType,
    Rets: WasmTypeList
[src]

pub fn call(&self, A1: A1, A2: A2, A3: A3, A4: A4) -> Result<Rets, RuntimeError>[src]

Call the typed func and return results.

impl<A1, A2, A3, A4, A5, Rets> NativeFunc<(A1, A2, A3, A4, A5), Rets> where
    A1: FromToNativeWasmType,
    A2: FromToNativeWasmType,
    A3: FromToNativeWasmType,
    A4: FromToNativeWasmType,
    A5: FromToNativeWasmType,
    Rets: WasmTypeList
[src]

pub fn call(
    &self,
    A1: A1,
    A2: A2,
    A3: A3,
    A4: A4,
    A5: A5
) -> Result<Rets, RuntimeError>
[src]

Call the typed func and return results.

impl<A1, A2, A3, A4, A5, A6, Rets> NativeFunc<(A1, A2, A3, A4, A5, A6), Rets> where
    A1: FromToNativeWasmType,
    A2: FromToNativeWasmType,
    A3: FromToNativeWasmType,
    A4: FromToNativeWasmType,
    A5: FromToNativeWasmType,
    A6: FromToNativeWasmType,
    Rets: WasmTypeList
[src]

pub fn call(
    &self,
    A1: A1,
    A2: A2,
    A3: A3,
    A4: A4,
    A5: A5,
    A6: A6
) -> Result<Rets, RuntimeError>
[src]

Call the typed func and return results.

impl<A1, A2, A3, A4, A5, A6, A7, Rets> NativeFunc<(A1, A2, A3, A4, A5, A6, A7), Rets> where
    A1: FromToNativeWasmType,
    A2: FromToNativeWasmType,
    A3: FromToNativeWasmType,
    A4: FromToNativeWasmType,
    A5: FromToNativeWasmType,
    A6: FromToNativeWasmType,
    A7: FromToNativeWasmType,
    Rets: WasmTypeList
[src]

pub fn call(
    &self,
    A1: A1,
    A2: A2,
    A3: A3,
    A4: A4,
    A5: A5,
    A6: A6,
    A7: A7
) -> Result<Rets, RuntimeError>
[src]

Call the typed func and return results.

impl<A1, A2, A3, A4, A5, A6, A7, A8, Rets> NativeFunc<(A1, A2, A3, A4, A5, A6, A7, A8), Rets> where
    A1: FromToNativeWasmType,
    A2: FromToNativeWasmType,
    A3: FromToNativeWasmType,
    A4: FromToNativeWasmType,
    A5: FromToNativeWasmType,
    A6: FromToNativeWasmType,
    A7: FromToNativeWasmType,
    A8: FromToNativeWasmType,
    Rets: WasmTypeList
[src]

pub fn call(
    &self,
    A1: A1,
    A2: A2,
    A3: A3,
    A4: A4,
    A5: A5,
    A6: A6,
    A7: A7,
    A8: A8
) -> Result<Rets, RuntimeError>
[src]

Call the typed func and return results.

impl<A1, A2, A3, A4, A5, A6, A7, A8, A9, Rets> NativeFunc<(A1, A2, A3, A4, A5, A6, A7, A8, A9), Rets> where
    A1: FromToNativeWasmType,
    A2: FromToNativeWasmType,
    A3: FromToNativeWasmType,
    A4: FromToNativeWasmType,
    A5: FromToNativeWasmType,
    A6: FromToNativeWasmType,
    A7: FromToNativeWasmType,
    A8: FromToNativeWasmType,
    A9: FromToNativeWasmType,
    Rets: WasmTypeList
[src]

pub fn call(
    &self,
    A1: A1,
    A2: A2,
    A3: A3,
    A4: A4,
    A5: A5,
    A6: A6,
    A7: A7,
    A8: A8,
    A9: A9
) -> Result<Rets, RuntimeError>
[src]

Call the typed func and return results.

impl<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, Rets> NativeFunc<(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10), Rets> where
    A1: FromToNativeWasmType,
    A2: FromToNativeWasmType,
    A3: FromToNativeWasmType,
    A4: FromToNativeWasmType,
    A5: FromToNativeWasmType,
    A6: FromToNativeWasmType,
    A7: FromToNativeWasmType,
    A8: FromToNativeWasmType,
    A9: FromToNativeWasmType,
    A10: FromToNativeWasmType,
    Rets: WasmTypeList
[src]

pub fn call(
    &self,
    A1: A1,
    A2: A2,
    A3: A3,
    A4: A4,
    A5: A5,
    A6: A6,
    A7: A7,
    A8: A8,
    A9: A9,
    A10: A10
) -> Result<Rets, RuntimeError>
[src]

Call the typed func and return results.

impl<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, Rets> NativeFunc<(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11), Rets> where
    A1: FromToNativeWasmType,
    A2: FromToNativeWasmType,
    A3: FromToNativeWasmType,
    A4: FromToNativeWasmType,
    A5: FromToNativeWasmType,
    A6: FromToNativeWasmType,
    A7: FromToNativeWasmType,
    A8: FromToNativeWasmType,
    A9: FromToNativeWasmType,
    A10: FromToNativeWasmType,
    A11: FromToNativeWasmType,
    Rets: WasmTypeList
[src]

pub fn call(
    &self,
    A1: A1,
    A2: A2,
    A3: A3,
    A4: A4,
    A5: A5,
    A6: A6,
    A7: A7,
    A8: A8,
    A9: A9,
    A10: A10,
    A11: A11
) -> Result<Rets, RuntimeError>
[src]

Call the typed func and return results.

impl<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, Rets> NativeFunc<(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12), Rets> where
    A1: FromToNativeWasmType,
    A2: FromToNativeWasmType,
    A3: FromToNativeWasmType,
    A4: FromToNativeWasmType,
    A5: FromToNativeWasmType,
    A6: FromToNativeWasmType,
    A7: FromToNativeWasmType,
    A8: FromToNativeWasmType,
    A9: FromToNativeWasmType,
    A10: FromToNativeWasmType,
    A11: FromToNativeWasmType,
    A12: FromToNativeWasmType,
    Rets: WasmTypeList
[src]

pub fn call(
    &self,
    A1: A1,
    A2: A2,
    A3: A3,
    A4: A4,
    A5: A5,
    A6: A6,
    A7: A7,
    A8: A8,
    A9: A9,
    A10: A10,
    A11: A11,
    A12: A12
) -> Result<Rets, RuntimeError>
[src]

Call the typed func and return results.

impl<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, Rets> NativeFunc<(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13), Rets> where
    A1: FromToNativeWasmType,
    A2: FromToNativeWasmType,
    A3: FromToNativeWasmType,
    A4: FromToNativeWasmType,
    A5: FromToNativeWasmType,
    A6: FromToNativeWasmType,
    A7: FromToNativeWasmType,
    A8: FromToNativeWasmType,
    A9: FromToNativeWasmType,
    A10: FromToNativeWasmType,
    A11: FromToNativeWasmType,
    A12: FromToNativeWasmType,
    A13: FromToNativeWasmType,
    Rets: WasmTypeList
[src]

pub fn call(
    &self,
    A1: A1,
    A2: A2,
    A3: A3,
    A4: A4,
    A5: A5,
    A6: A6,
    A7: A7,
    A8: A8,
    A9: A9,
    A10: A10,
    A11: A11,
    A12: A12,
    A13: A13
) -> Result<Rets, RuntimeError>
[src]

Call the typed func and return results.

impl<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, Rets> NativeFunc<(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14), Rets> where
    A1: FromToNativeWasmType,
    A2: FromToNativeWasmType,
    A3: FromToNativeWasmType,
    A4: FromToNativeWasmType,
    A5: FromToNativeWasmType,
    A6: FromToNativeWasmType,
    A7: FromToNativeWasmType,
    A8: FromToNativeWasmType,
    A9: FromToNativeWasmType,
    A10: FromToNativeWasmType,
    A11: FromToNativeWasmType,
    A12: FromToNativeWasmType,
    A13: FromToNativeWasmType,
    A14: FromToNativeWasmType,
    Rets: WasmTypeList
[src]

pub fn call(
    &self,
    A1: A1,
    A2: A2,
    A3: A3,
    A4: A4,
    A5: A5,
    A6: A6,
    A7: A7,
    A8: A8,
    A9: A9,
    A10: A10,
    A11: A11,
    A12: A12,
    A13: A13,
    A14: A14
) -> Result<Rets, RuntimeError>
[src]

Call the typed func and return results.

impl<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, Rets> NativeFunc<(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15), Rets> where
    A1: FromToNativeWasmType,
    A2: FromToNativeWasmType,
    A3: FromToNativeWasmType,
    A4: FromToNativeWasmType,
    A5: FromToNativeWasmType,
    A6: FromToNativeWasmType,
    A7: FromToNativeWasmType,
    A8: FromToNativeWasmType,
    A9: FromToNativeWasmType,
    A10: FromToNativeWasmType,
    A11: FromToNativeWasmType,
    A12: FromToNativeWasmType,
    A13: FromToNativeWasmType,
    A14: FromToNativeWasmType,
    A15: FromToNativeWasmType,
    Rets: WasmTypeList
[src]

pub fn call(
    &self,
    A1: A1,
    A2: A2,
    A3: A3,
    A4: A4,
    A5: A5,
    A6: A6,
    A7: A7,
    A8: A8,
    A9: A9,
    A10: A10,
    A11: A11,
    A12: A12,
    A13: A13,
    A14: A14,
    A15: A15
) -> Result<Rets, RuntimeError>
[src]

Call the typed func and return results.

impl<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, Rets> NativeFunc<(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16), Rets> where
    A1: FromToNativeWasmType,
    A2: FromToNativeWasmType,
    A3: FromToNativeWasmType,
    A4: FromToNativeWasmType,
    A5: FromToNativeWasmType,
    A6: FromToNativeWasmType,
    A7: FromToNativeWasmType,
    A8: FromToNativeWasmType,
    A9: FromToNativeWasmType,
    A10: FromToNativeWasmType,
    A11: FromToNativeWasmType,
    A12: FromToNativeWasmType,
    A13: FromToNativeWasmType,
    A14: FromToNativeWasmType,
    A15: FromToNativeWasmType,
    A16: FromToNativeWasmType,
    Rets: WasmTypeList
[src]

pub fn call(
    &self,
    A1: A1,
    A2: A2,
    A3: A3,
    A4: A4,
    A5: A5,
    A6: A6,
    A7: A7,
    A8: A8,
    A9: A9,
    A10: A10,
    A11: A11,
    A12: A12,
    A13: A13,
    A14: A14,
    A15: A15,
    A16: A16
) -> Result<Rets, RuntimeError>
[src]

Call the typed func and return results.

impl<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, Rets> NativeFunc<(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17), Rets> where
    A1: FromToNativeWasmType,
    A2: FromToNativeWasmType,
    A3: FromToNativeWasmType,
    A4: FromToNativeWasmType,
    A5: FromToNativeWasmType,
    A6: FromToNativeWasmType,
    A7: FromToNativeWasmType,
    A8: FromToNativeWasmType,
    A9: FromToNativeWasmType,
    A10: FromToNativeWasmType,
    A11: FromToNativeWasmType,
    A12: FromToNativeWasmType,
    A13: FromToNativeWasmType,
    A14: FromToNativeWasmType,
    A15: FromToNativeWasmType,
    A16: FromToNativeWasmType,
    A17: FromToNativeWasmType,
    Rets: WasmTypeList
[src]

pub fn call(
    &self,
    A1: A1,
    A2: A2,
    A3: A3,
    A4: A4,
    A5: A5,
    A6: A6,
    A7: A7,
    A8: A8,
    A9: A9,
    A10: A10,
    A11: A11,
    A12: A12,
    A13: A13,
    A14: A14,
    A15: A15,
    A16: A16,
    A17: A17
) -> Result<Rets, RuntimeError>
[src]

Call the typed func and return results.

impl<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, Rets> NativeFunc<(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18), Rets> where
    A1: FromToNativeWasmType,
    A2: FromToNativeWasmType,
    A3: FromToNativeWasmType,
    A4: FromToNativeWasmType,
    A5: FromToNativeWasmType,
    A6: FromToNativeWasmType,
    A7: FromToNativeWasmType,
    A8: FromToNativeWasmType,
    A9: FromToNativeWasmType,
    A10: FromToNativeWasmType,
    A11: FromToNativeWasmType,
    A12: FromToNativeWasmType,
    A13: FromToNativeWasmType,
    A14: FromToNativeWasmType,
    A15: FromToNativeWasmType,
    A16: FromToNativeWasmType,
    A17: FromToNativeWasmType,
    A18: FromToNativeWasmType,
    Rets: WasmTypeList
[src]

pub fn call(
    &self,
    A1: A1,
    A2: A2,
    A3: A3,
    A4: A4,
    A5: A5,
    A6: A6,
    A7: A7,
    A8: A8,
    A9: A9,
    A10: A10,
    A11: A11,
    A12: A12,
    A13: A13,
    A14: A14,
    A15: A15,
    A16: A16,
    A17: A17,
    A18: A18
) -> Result<Rets, RuntimeError>
[src]

Call the typed func and return results.

impl<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, Rets> NativeFunc<(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19), Rets> where
    A1: FromToNativeWasmType,
    A2: FromToNativeWasmType,
    A3: FromToNativeWasmType,
    A4: FromToNativeWasmType,
    A5: FromToNativeWasmType,
    A6: FromToNativeWasmType,
    A7: FromToNativeWasmType,
    A8: FromToNativeWasmType,
    A9: FromToNativeWasmType,
    A10: FromToNativeWasmType,
    A11: FromToNativeWasmType,
    A12: FromToNativeWasmType,
    A13: FromToNativeWasmType,
    A14: FromToNativeWasmType,
    A15: FromToNativeWasmType,
    A16: FromToNativeWasmType,
    A17: FromToNativeWasmType,
    A18: FromToNativeWasmType,
    A19: FromToNativeWasmType,
    Rets: WasmTypeList
[src]

pub fn call(
    &self,
    A1: A1,
    A2: A2,
    A3: A3,
    A4: A4,
    A5: A5,
    A6: A6,
    A7: A7,
    A8: A8,
    A9: A9,
    A10: A10,
    A11: A11,
    A12: A12,
    A13: A13,
    A14: A14,
    A15: A15,
    A16: A16,
    A17: A17,
    A18: A18,
    A19: A19
) -> Result<Rets, RuntimeError>
[src]

Call the typed func and return results.

impl<A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20, Rets> NativeFunc<(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15, A16, A17, A18, A19, A20), Rets> where
    A1: FromToNativeWasmType,
    A2: FromToNativeWasmType,
    A3: FromToNativeWasmType,
    A4: FromToNativeWasmType,
    A5: FromToNativeWasmType,
    A6: FromToNativeWasmType,
    A7: FromToNativeWasmType,
    A8: FromToNativeWasmType,
    A9: FromToNativeWasmType,
    A10: FromToNativeWasmType,
    A11: FromToNativeWasmType,
    A12: FromToNativeWasmType,
    A13: FromToNativeWasmType,
    A14: FromToNativeWasmType,
    A15: FromToNativeWasmType,
    A16: FromToNativeWasmType,
    A17: FromToNativeWasmType,
    A18: FromToNativeWasmType,
    A19: FromToNativeWasmType,
    A20: FromToNativeWasmType,
    Rets: WasmTypeList
[src]

pub fn call(
    &self,
    A1: A1,
    A2: A2,
    A3: A3,
    A4: A4,
    A5: A5,
    A6: A6,
    A7: A7,
    A8: A8,
    A9: A9,
    A10: A10,
    A11: A11,
    A12: A12,
    A13: A13,
    A14: A14,
    A15: A15,
    A16: A16,
    A17: A17,
    A18: A18,
    A19: A19,
    A20: A20
) -> Result<Rets, RuntimeError>
[src]

Call the typed func and return results.

Trait Implementations

impl<Args: WasmTypeList, Rets: WasmTypeList> Clone for NativeFunc<Args, Rets>[src]

fn clone(&self) -> Self[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl<Args, Rets> From<NativeFunc<Args, Rets>> for Function where
    Args: WasmTypeList,
    Rets: WasmTypeList
[src]

fn from(other: NativeFunc<Args, Rets>) -> Self[src]

Performs the conversion.

impl<Args, Rets> Send for NativeFunc<Args, Rets>[src]

Auto Trait Implementations

impl<Args = (), Rets = ()> !RefUnwindSafe for NativeFunc<Args, Rets>

impl<Args, Rets> Sync for NativeFunc<Args, Rets> where
    Args: Sync,
    Rets: Sync

impl<Args, Rets> Unpin for NativeFunc<Args, Rets> where
    Args: Unpin,
    Rets: Unpin

impl<Args = (), Rets = ()> !UnwindSafe for NativeFunc<Args, Rets>

Blanket Implementations

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

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> ArchivePointee for T

type ArchivedMetadata = ()

The archived version of the pointer metadata for this type.

pub fn pointer_metadata(
    &<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata

Converts some archived metadata to the pointer metadata for itself.

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

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

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

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

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

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T> Instrument for T[src]

fn instrument(self, span: Span) -> Instrumented<Self>[src]

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

fn in_current_span(self) -> Instrumented<Self>[src]

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

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

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> Pointable for T

pub const ALIGN: usize

The alignment of pointer.

type Init = T

The type for initializers.

pub unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more

pub unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more

pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more

pub unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more

impl<T> Pointee for T

type Metadata = ()

The type for metadata in pointers and references to Self.

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

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

Creates owned data from borrowed data, usually by cloning. Read more

pub fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

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.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

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.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.