[][src]Trait wasm_bindgen::convert::ReturnWasmAbi

pub trait ReturnWasmAbi: WasmDescribe {
    type Abi: WasmAbi;
    fn return_abi(self, extra: &mut dyn Stack) -> Self::Abi;
}

A trait representing how to interepret the return value of a function for the wasm ABI.

This is very similar to the IntoWasmAbi trait and in fact has a blanket implementation for all implementors of the IntoWasmAbi. The primary use case of this trait is to enable functions to return Result, interpreting an error as "rethrow this to JS"

Associated Types

type Abi: WasmAbi

Same as IntoWasmAbi::Abi

Loading content...

Required methods

fn return_abi(self, extra: &mut dyn Stack) -> Self::Abi

Same as IntoWasmAbi::into_abi, except that it may throw and never return in the case of Err.

Loading content...

Implementations on Foreign Types

impl<T: IntoWasmAbi> ReturnWasmAbi for Result<T, JsValue>[src]

type Abi = T::Abi

Loading content...

Implementors

impl<T: IntoWasmAbi> ReturnWasmAbi for T[src]

type Abi = T::Abi

Loading content...