Trait ReturnWasmAbi
pub trait ReturnWasmAbi: WasmDescribe
A trait representing how to interpret 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"
⚠️ Unstable
This is part of the internal convert module, no
stability guarantees are provided. Use at your own risk. See its
documentation for more details.
Associated Types
type Abi: WasmAbi;Same as
IntoWasmAbi::Abi
Required Methods
fn return_abi(self) -> Self::AbiSame as
IntoWasmAbi::into_abi, except that it may throw and never return in the case ofErr.
Implementors
impl<T> ReturnWasmAbi for Clamped<T> where T: IntoWasmAbi,impl<T> ReturnWasmAbi for JsError where T: IntoWasmAbi,impl<T> ReturnWasmAbi for JsNullable<T> where T: IntoWasmAbi,impl<T> ReturnWasmAbi for JsOption<T> where T: IntoWasmAbi,impl<T> ReturnWasmAbi for JsValue where T: IntoWasmAbi,impl<T> ReturnWasmAbi for Null where T: IntoWasmAbi,impl<T> ReturnWasmAbi for ScopedClosure<'a, T> where T: IntoWasmAbi,impl<T> ReturnWasmAbi for Undefined where T: IntoWasmAbi,impl<T, E> ReturnWasmAbi for Result<T, E> where T: IntoWasmAbi, E: Into<JsValue>, T::Abi: WasmAbi<Prim3 = (), Prim4 = ()>,impl<T: IntoWasmAbi> ReturnWasmAbi for T