Trait wasmer::WasmTypeList[][src]

pub trait WasmTypeList where
    Self: Sized
{ type CStruct; type Array: AsMut<[i128]>; fn from_array(array: Self::Array) -> Self;
fn from_slice(slice: &[i128]) -> Result<Self, TryFromSliceError>;
fn into_array(self) -> Self::Array;
fn empty_array() -> Self::Array;
fn from_c_struct(c_struct: Self::CStruct) -> Self;
fn into_c_struct(self) -> Self::CStruct;
fn wasm_types() -> &'static [Type]
Notable traits for &'_ mut [u8]
impl<'_> Write for &'_ mut [u8]impl<'_> Read for &'_ [u8]
; }
Expand description

The WasmTypeList trait represents a tuple (list) of Wasm typed values. It is used to get low-level representation of such a tuple.

Associated Types

The C type (a struct) that can hold/represent all the represented values.

The array type that can hold all the represented values.

Note that all values are stored in their binary form.

Required methods

Constructs Self based on an array of values.

Constructs Self based on a slice of values.

from_slice returns a Result because it is possible that the slice doesn’t have the same size than Self::Array, in which circumstance an error of kind TryFromSliceError will be returned.

Builds and returns an array of type Array from a tuple (list) of values.

Allocates and return an empty array of type Array that will hold a tuple (list) of values, usually to hold the returned values of a WebAssembly function call.

Builds a tuple (list) of values from a C struct of type CStruct.

Builds and returns a C struct of type CStruct from a tuple (list) of values.

Get the Wasm types for the tuple (list) of currently represented values.

Implementations on Foreign Types

Implementors