[][src]Trait wasmer_runtime_core::typed_func::WasmTypeList

pub trait WasmTypeList {
    type CStruct;
    type RetArray: AsMut<[u64]>;
    fn from_ret_array(array: Self::RetArray) -> Self;
fn empty_ret_array() -> Self::RetArray;
fn from_c_struct(c_struct: Self::CStruct) -> Self;
fn into_c_struct(self) -> Self::CStruct;
fn types() -> &'static [Type];
unsafe fn call<Rets>(
        self,
        f: NonNull<Func>,
        wasm: Wasm,
        ctx: *mut Ctx
    ) -> Result<Rets, RuntimeError>
    where
        Rets: WasmTypeList
; }

Represents a list of WebAssembly values.

Associated Types

type CStruct

CStruct type.

type RetArray: AsMut<[u64]>

Array of return values.

Loading content...

Required methods

fn from_ret_array(array: Self::RetArray) -> Self

Construct Self based on an array of returned values.

fn empty_ret_array() -> Self::RetArray

Generates an empty array that will hold the returned values of the WebAssembly function.

fn from_c_struct(c_struct: Self::CStruct) -> Self

Transforms C values into Rust values.

fn into_c_struct(self) -> Self::CStruct

Transforms Rust values into C values.

fn types() -> &'static [Type]

Get types of the current values.

unsafe fn call<Rets>(
    self,
    f: NonNull<Func>,
    wasm: Wasm,
    ctx: *mut Ctx
) -> Result<Rets, RuntimeError> where
    Rets: WasmTypeList

This method is used to distribute the values onto a function, e.g. (1, 2).call(func, …). This form is unlikely to be used directly in the code, see the Func::call implementation.

Loading content...

Implementations on Foreign Types

impl WasmTypeList for Infallible[src]

type CStruct = Infallible

type RetArray = [u64; 0]

impl WasmTypeList for ()[src]

type CStruct = S0

type RetArray = [u64; 0]

impl<A, B> WasmTypeList for (A, B) where
    A: WasmExternType,
    B: WasmExternType
[src]

type CStruct = S2<A, B>

type RetArray = [u64; 2]

impl<A, B, C> WasmTypeList for (A, B, C) where
    A: WasmExternType,
    B: WasmExternType,
    C: WasmExternType
[src]

type CStruct = S3<A, B, C>

type RetArray = [u64; 3]

impl<A, B, C, D> WasmTypeList for (A, B, C, D) where
    A: WasmExternType,
    B: WasmExternType,
    C: WasmExternType,
    D: WasmExternType
[src]

type CStruct = S4<A, B, C, D>

type RetArray = [u64; 4]

impl<A, B, C, D, E> WasmTypeList for (A, B, C, D, E) where
    A: WasmExternType,
    B: WasmExternType,
    C: WasmExternType,
    D: WasmExternType,
    E: WasmExternType
[src]

type CStruct = S5<A, B, C, D, E>

type RetArray = [u64; 5]

impl<A, B, C, D, E, F> WasmTypeList for (A, B, C, D, E, F) where
    A: WasmExternType,
    B: WasmExternType,
    C: WasmExternType,
    D: WasmExternType,
    E: WasmExternType,
    F: WasmExternType
[src]

type CStruct = S6<A, B, C, D, E, F>

type RetArray = [u64; 6]

impl<A, B, C, D, E, F, G> WasmTypeList for (A, B, C, D, E, F, G) where
    A: WasmExternType,
    B: WasmExternType,
    C: WasmExternType,
    D: WasmExternType,
    E: WasmExternType,
    F: WasmExternType,
    G: WasmExternType
[src]

type CStruct = S7<A, B, C, D, E, F, G>

type RetArray = [u64; 7]

impl<A, B, C, D, E, F, G, H> WasmTypeList for (A, B, C, D, E, F, G, H) where
    A: WasmExternType,
    B: WasmExternType,
    C: WasmExternType,
    D: WasmExternType,
    E: WasmExternType,
    F: WasmExternType,
    G: WasmExternType,
    H: WasmExternType
[src]

type CStruct = S8<A, B, C, D, E, F, G, H>

type RetArray = [u64; 8]

impl<A, B, C, D, E, F, G, H, I> WasmTypeList for (A, B, C, D, E, F, G, H, I) where
    A: WasmExternType,
    B: WasmExternType,
    C: WasmExternType,
    D: WasmExternType,
    E: WasmExternType,
    F: WasmExternType,
    G: WasmExternType,
    H: WasmExternType,
    I: WasmExternType
[src]

type CStruct = S9<A, B, C, D, E, F, G, H, I>

type RetArray = [u64; 9]

impl<A, B, C, D, E, F, G, H, I, J> WasmTypeList for (A, B, C, D, E, F, G, H, I, J) where
    A: WasmExternType,
    B: WasmExternType,
    C: WasmExternType,
    D: WasmExternType,
    E: WasmExternType,
    F: WasmExternType,
    G: WasmExternType,
    H: WasmExternType,
    I: WasmExternType,
    J: WasmExternType
[src]

type CStruct = S10<A, B, C, D, E, F, G, H, I, J>

type RetArray = [u64; 10]

impl<A, B, C, D, E, F, G, H, I, J, K> WasmTypeList for (A, B, C, D, E, F, G, H, I, J, K) where
    A: WasmExternType,
    B: WasmExternType,
    C: WasmExternType,
    D: WasmExternType,
    E: WasmExternType,
    F: WasmExternType,
    G: WasmExternType,
    H: WasmExternType,
    I: WasmExternType,
    J: WasmExternType,
    K: WasmExternType
[src]

type CStruct = S11<A, B, C, D, E, F, G, H, I, J, K>

type RetArray = [u64; 11]

impl<A, B, C, D, E, F, G, H, I, J, K, L> WasmTypeList for (A, B, C, D, E, F, G, H, I, J, K, L) where
    A: WasmExternType,
    B: WasmExternType,
    C: WasmExternType,
    D: WasmExternType,
    E: WasmExternType,
    F: WasmExternType,
    G: WasmExternType,
    H: WasmExternType,
    I: WasmExternType,
    J: WasmExternType,
    K: WasmExternType,
    L: WasmExternType
[src]

type CStruct = S12<A, B, C, D, E, F, G, H, I, J, K, L>

type RetArray = [u64; 12]

impl<A, B, C, D, E, F, G, H, I, J, K, L, M> WasmTypeList for (A, B, C, D, E, F, G, H, I, J, K, L, M) where
    A: WasmExternType,
    B: WasmExternType,
    C: WasmExternType,
    D: WasmExternType,
    E: WasmExternType,
    F: WasmExternType,
    G: WasmExternType,
    H: WasmExternType,
    I: WasmExternType,
    J: WasmExternType,
    K: WasmExternType,
    L: WasmExternType,
    M: WasmExternType
[src]

type CStruct = S13<A, B, C, D, E, F, G, H, I, J, K, L, M>

type RetArray = [u64; 13]

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N> WasmTypeList for (A, B, C, D, E, F, G, H, I, J, K, L, M, N) where
    A: WasmExternType,
    B: WasmExternType,
    C: WasmExternType,
    D: WasmExternType,
    E: WasmExternType,
    F: WasmExternType,
    G: WasmExternType,
    H: WasmExternType,
    I: WasmExternType,
    J: WasmExternType,
    K: WasmExternType,
    L: WasmExternType,
    M: WasmExternType,
    N: WasmExternType
[src]

type CStruct = S14<A, B, C, D, E, F, G, H, I, J, K, L, M, N>

type RetArray = [u64; 14]

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O> WasmTypeList for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O) where
    A: WasmExternType,
    B: WasmExternType,
    C: WasmExternType,
    D: WasmExternType,
    E: WasmExternType,
    F: WasmExternType,
    G: WasmExternType,
    H: WasmExternType,
    I: WasmExternType,
    J: WasmExternType,
    K: WasmExternType,
    L: WasmExternType,
    M: WasmExternType,
    N: WasmExternType,
    O: WasmExternType
[src]

type CStruct = S15<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O>

type RetArray = [u64; 15]

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P> WasmTypeList for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P) where
    A: WasmExternType,
    B: WasmExternType,
    C: WasmExternType,
    D: WasmExternType,
    E: WasmExternType,
    F: WasmExternType,
    G: WasmExternType,
    H: WasmExternType,
    I: WasmExternType,
    J: WasmExternType,
    K: WasmExternType,
    L: WasmExternType,
    M: WasmExternType,
    N: WasmExternType,
    O: WasmExternType,
    P: WasmExternType
[src]

type CStruct = S16<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P>

type RetArray = [u64; 16]

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q> WasmTypeList for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q) where
    A: WasmExternType,
    B: WasmExternType,
    C: WasmExternType,
    D: WasmExternType,
    E: WasmExternType,
    F: WasmExternType,
    G: WasmExternType,
    H: WasmExternType,
    I: WasmExternType,
    J: WasmExternType,
    K: WasmExternType,
    L: WasmExternType,
    M: WasmExternType,
    N: WasmExternType,
    O: WasmExternType,
    P: WasmExternType,
    Q: WasmExternType
[src]

type CStruct = S17<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q>

type RetArray = [u64; 17]

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R> WasmTypeList for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R) where
    A: WasmExternType,
    B: WasmExternType,
    C: WasmExternType,
    D: WasmExternType,
    E: WasmExternType,
    F: WasmExternType,
    G: WasmExternType,
    H: WasmExternType,
    I: WasmExternType,
    J: WasmExternType,
    K: WasmExternType,
    L: WasmExternType,
    M: WasmExternType,
    N: WasmExternType,
    O: WasmExternType,
    P: WasmExternType,
    Q: WasmExternType,
    R: WasmExternType
[src]

type CStruct = S18<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R>

type RetArray = [u64; 18]

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S> WasmTypeList for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S) where
    A: WasmExternType,
    B: WasmExternType,
    C: WasmExternType,
    D: WasmExternType,
    E: WasmExternType,
    F: WasmExternType,
    G: WasmExternType,
    H: WasmExternType,
    I: WasmExternType,
    J: WasmExternType,
    K: WasmExternType,
    L: WasmExternType,
    M: WasmExternType,
    N: WasmExternType,
    O: WasmExternType,
    P: WasmExternType,
    Q: WasmExternType,
    R: WasmExternType,
    S: WasmExternType
[src]

type CStruct = S19<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S>

type RetArray = [u64; 19]

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T> WasmTypeList for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T) where
    A: WasmExternType,
    B: WasmExternType,
    C: WasmExternType,
    D: WasmExternType,
    E: WasmExternType,
    F: WasmExternType,
    G: WasmExternType,
    H: WasmExternType,
    I: WasmExternType,
    J: WasmExternType,
    K: WasmExternType,
    L: WasmExternType,
    M: WasmExternType,
    N: WasmExternType,
    O: WasmExternType,
    P: WasmExternType,
    Q: WasmExternType,
    R: WasmExternType,
    S: WasmExternType,
    T: WasmExternType
[src]

type CStruct = S20<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T>

type RetArray = [u64; 20]

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U> WasmTypeList for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U) where
    A: WasmExternType,
    B: WasmExternType,
    C: WasmExternType,
    D: WasmExternType,
    E: WasmExternType,
    F: WasmExternType,
    G: WasmExternType,
    H: WasmExternType,
    I: WasmExternType,
    J: WasmExternType,
    K: WasmExternType,
    L: WasmExternType,
    M: WasmExternType,
    N: WasmExternType,
    O: WasmExternType,
    P: WasmExternType,
    Q: WasmExternType,
    R: WasmExternType,
    S: WasmExternType,
    T: WasmExternType,
    U: WasmExternType
[src]

type CStruct = S21<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U>

type RetArray = [u64; 21]

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V> WasmTypeList for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V) where
    A: WasmExternType,
    B: WasmExternType,
    C: WasmExternType,
    D: WasmExternType,
    E: WasmExternType,
    F: WasmExternType,
    G: WasmExternType,
    H: WasmExternType,
    I: WasmExternType,
    J: WasmExternType,
    K: WasmExternType,
    L: WasmExternType,
    M: WasmExternType,
    N: WasmExternType,
    O: WasmExternType,
    P: WasmExternType,
    Q: WasmExternType,
    R: WasmExternType,
    S: WasmExternType,
    T: WasmExternType,
    U: WasmExternType,
    V: WasmExternType
[src]

type CStruct = S22<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V>

type RetArray = [u64; 22]

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W> WasmTypeList for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W) where
    A: WasmExternType,
    B: WasmExternType,
    C: WasmExternType,
    D: WasmExternType,
    E: WasmExternType,
    F: WasmExternType,
    G: WasmExternType,
    H: WasmExternType,
    I: WasmExternType,
    J: WasmExternType,
    K: WasmExternType,
    L: WasmExternType,
    M: WasmExternType,
    N: WasmExternType,
    O: WasmExternType,
    P: WasmExternType,
    Q: WasmExternType,
    R: WasmExternType,
    S: WasmExternType,
    T: WasmExternType,
    U: WasmExternType,
    V: WasmExternType,
    W: WasmExternType
[src]

type CStruct = S23<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W>

type RetArray = [u64; 23]

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X> WasmTypeList for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X) where
    A: WasmExternType,
    B: WasmExternType,
    C: WasmExternType,
    D: WasmExternType,
    E: WasmExternType,
    F: WasmExternType,
    G: WasmExternType,
    H: WasmExternType,
    I: WasmExternType,
    J: WasmExternType,
    K: WasmExternType,
    L: WasmExternType,
    M: WasmExternType,
    N: WasmExternType,
    O: WasmExternType,
    P: WasmExternType,
    Q: WasmExternType,
    R: WasmExternType,
    S: WasmExternType,
    T: WasmExternType,
    U: WasmExternType,
    V: WasmExternType,
    W: WasmExternType,
    X: WasmExternType
[src]

type CStruct = S24<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X>

type RetArray = [u64; 24]

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y> WasmTypeList for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y) where
    A: WasmExternType,
    B: WasmExternType,
    C: WasmExternType,
    D: WasmExternType,
    E: WasmExternType,
    F: WasmExternType,
    G: WasmExternType,
    H: WasmExternType,
    I: WasmExternType,
    J: WasmExternType,
    K: WasmExternType,
    L: WasmExternType,
    M: WasmExternType,
    N: WasmExternType,
    O: WasmExternType,
    P: WasmExternType,
    Q: WasmExternType,
    R: WasmExternType,
    S: WasmExternType,
    T: WasmExternType,
    U: WasmExternType,
    V: WasmExternType,
    W: WasmExternType,
    X: WasmExternType,
    Y: WasmExternType
[src]

type CStruct = S25<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y>

type RetArray = [u64; 25]

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z> WasmTypeList for (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z) where
    A: WasmExternType,
    B: WasmExternType,
    C: WasmExternType,
    D: WasmExternType,
    E: WasmExternType,
    F: WasmExternType,
    G: WasmExternType,
    H: WasmExternType,
    I: WasmExternType,
    J: WasmExternType,
    K: WasmExternType,
    L: WasmExternType,
    M: WasmExternType,
    N: WasmExternType,
    O: WasmExternType,
    P: WasmExternType,
    Q: WasmExternType,
    R: WasmExternType,
    S: WasmExternType,
    T: WasmExternType,
    U: WasmExternType,
    V: WasmExternType,
    W: WasmExternType,
    X: WasmExternType,
    Y: WasmExternType,
    Z: WasmExternType
[src]

type CStruct = S26<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z>

type RetArray = [u64; 26]

Loading content...

Implementors

impl<A> WasmTypeList for A where
    A: WasmExternType
[src]

type CStruct = S1<A>

type RetArray = [u64; 1]

Loading content...