Trait wasmer_runtime_core_fl::typed_func::WasmTypeList [−][src]
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; }
Expand description
Represents a list of WebAssembly values.
Associated Types
Required methods
fn from_ret_array(array: Self::RetArray) -> Self
fn from_ret_array(array: Self::RetArray) -> Self
Construct Self
based on an array of returned values.
fn empty_ret_array() -> Self::RetArray
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
fn from_c_struct(c_struct: Self::CStruct) -> Self
Transforms C values into Rust values.
fn into_c_struct(self) -> Self::CStruct
fn into_c_struct(self) -> Self::CStruct
Transforms Rust values into C values.
fn types() -> &'static [Type]
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,
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.