[][src]Trait wasm_bindgen::convert::FromWasmAbi

pub trait FromWasmAbi: WasmDescribe {
    type Abi: WasmAbi;
    unsafe fn from_abi(js: Self::Abi, extra: &mut dyn Stack) -> Self;
}

A trait for anything that can be recovered by-value from the wasm ABI boundary, eg a Rust u8 can be recovered from the wasm ABI u32 type.

This is the by-value variant of the opposite operation as IntoWasmAbi.

Associated Types

type Abi: WasmAbi

The wasm ABI type that this converts from when coming back out from the ABI boundary.

Loading content...

Required methods

unsafe fn from_abi(js: Self::Abi, extra: &mut dyn Stack) -> Self

Recover a Self from Self::Abi.

Safety

This is only safe to call when -- and implementations may assume that -- the supplied Self::Abi was previously generated by a call to <Self as IntoWasmAbi>::into_abi() or the moral equivalent in JS.

Loading content...

Implementations on Foreign Types

impl FromWasmAbi for i32[src]

type Abi = i32

impl FromWasmAbi for Option<i32>[src]

type Abi = WasmOptionalI32

impl FromWasmAbi for isize[src]

type Abi = i32

impl FromWasmAbi for Option<isize>[src]

type Abi = WasmOptionalI32

impl FromWasmAbi for u32[src]

type Abi = u32

impl FromWasmAbi for Option<u32>[src]

type Abi = WasmOptionalU32

impl FromWasmAbi for usize[src]

type Abi = u32

impl FromWasmAbi for Option<usize>[src]

type Abi = WasmOptionalU32

impl FromWasmAbi for f32[src]

type Abi = f32

impl FromWasmAbi for Option<f32>[src]

type Abi = WasmOptionalF32

impl FromWasmAbi for f64[src]

type Abi = f64

impl FromWasmAbi for Option<f64>[src]

type Abi = WasmOptionalF64

impl FromWasmAbi for i8[src]

type Abi = u32

impl FromWasmAbi for u8[src]

type Abi = u32

impl FromWasmAbi for i16[src]

type Abi = u32

impl FromWasmAbi for u16[src]

type Abi = u32

impl FromWasmAbi for i64[src]

type Abi = Wasm64

impl FromWasmAbi for Option<i64>[src]

type Abi = WasmOptional64

impl FromWasmAbi for u64[src]

type Abi = Wasm64

impl FromWasmAbi for Option<u64>[src]

type Abi = WasmOptional64

impl FromWasmAbi for bool[src]

type Abi = u32

impl FromWasmAbi for char[src]

type Abi = u32

impl<T> FromWasmAbi for *const T[src]

type Abi = u32

impl<T> FromWasmAbi for *mut T[src]

type Abi = u32

impl<T: OptionFromWasmAbi> FromWasmAbi for Option<T>[src]

type Abi = T::Abi

impl FromWasmAbi for Box<[u8]>[src]

type Abi = WasmSlice

impl FromWasmAbi for Box<[i8]>[src]

type Abi = WasmSlice

impl FromWasmAbi for Box<[u16]>[src]

type Abi = WasmSlice

impl FromWasmAbi for Box<[i16]>[src]

type Abi = WasmSlice

impl FromWasmAbi for Box<[u32]>[src]

type Abi = WasmSlice

impl FromWasmAbi for Box<[i32]>[src]

type Abi = WasmSlice

impl FromWasmAbi for Box<[u64]>[src]

type Abi = WasmSlice

impl FromWasmAbi for Box<[i64]>[src]

type Abi = WasmSlice

impl FromWasmAbi for Box<[usize]>[src]

type Abi = WasmSlice

impl FromWasmAbi for Box<[isize]>[src]

type Abi = WasmSlice

impl FromWasmAbi for Box<[f32]>[src]

type Abi = WasmSlice

impl FromWasmAbi for Box<[f64]>[src]

type Abi = WasmSlice

impl<T> FromWasmAbi for Vec<T> where
    Box<[T]>: FromWasmAbi<Abi = WasmSlice>, 
[src]

type Abi = <Box<[T]> as FromWasmAbi>::Abi

impl FromWasmAbi for String[src]

type Abi = <Vec<u8> as FromWasmAbi>::Abi

impl FromWasmAbi for Box<[JsValue]>[src]

type Abi = WasmSlice

Loading content...

Implementors

impl FromWasmAbi for JsValue[src]

type Abi = u32

impl<T: FromWasmAbi> FromWasmAbi for Clamped<T>[src]

type Abi = T::Abi

Loading content...