Trait wasm_bindgen::convert::FromWasmAbi [−][src]
pub trait FromWasmAbi: WasmDescribe {
type Abi: WasmAbi;
unsafe fn from_abi(js: Self::Abi) -> 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[src]
The wasm ABI type that this converts from when coming back out from the ABI boundary.
Required methods
unsafe fn from_abi(js: Self::Abi) -> Self[src]
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.
Implementations on Foreign Types
impl FromWasmAbi for Option<i32>[src]
impl FromWasmAbi for Option<i32>[src]type Abi = WasmOptionalI32
unsafe fn from_abi(js: WasmOptionalI32) -> Self[src]
impl FromWasmAbi for Option<isize>[src]
impl FromWasmAbi for Option<isize>[src]type Abi = WasmOptionalI32
unsafe fn from_abi(js: WasmOptionalI32) -> Self[src]
impl FromWasmAbi for Option<u32>[src]
impl FromWasmAbi for Option<u32>[src]type Abi = WasmOptionalU32
unsafe fn from_abi(js: WasmOptionalU32) -> Self[src]
impl FromWasmAbi for Option<usize>[src]
impl FromWasmAbi for Option<usize>[src]type Abi = WasmOptionalU32
unsafe fn from_abi(js: WasmOptionalU32) -> Self[src]
impl FromWasmAbi for Option<f32>[src]
impl FromWasmAbi for Option<f32>[src]type Abi = WasmOptionalF32
unsafe fn from_abi(js: WasmOptionalF32) -> Self[src]
impl FromWasmAbi for Option<f64>[src]
impl FromWasmAbi for Option<f64>[src]type Abi = WasmOptionalF64
unsafe fn from_abi(js: WasmOptionalF64) -> Self[src]
impl FromWasmAbi for Option<i64>[src]
impl FromWasmAbi for Option<i64>[src]type Abi = WasmOptional64
unsafe fn from_abi(js: WasmOptional64) -> Self[src]
impl FromWasmAbi for Option<u64>[src]
impl FromWasmAbi for Option<u64>[src]type Abi = WasmOptional64
unsafe fn from_abi(js: WasmOptional64) -> Self[src]
impl<T: OptionFromWasmAbi> FromWasmAbi for Option<T>[src]
impl<T: OptionFromWasmAbi> FromWasmAbi for Option<T>[src]impl FromWasmAbi for Box<[u8]>[src]
impl FromWasmAbi for Box<[u8]>[src]impl FromWasmAbi for Box<[i8]>[src]
impl FromWasmAbi for Box<[i8]>[src]impl FromWasmAbi for Box<[u16]>[src]
impl FromWasmAbi for Box<[u16]>[src]impl FromWasmAbi for Box<[i16]>[src]
impl FromWasmAbi for Box<[i16]>[src]impl FromWasmAbi for Box<[u32]>[src]
impl FromWasmAbi for Box<[u32]>[src]impl FromWasmAbi for Box<[i32]>[src]
impl FromWasmAbi for Box<[i32]>[src]impl FromWasmAbi for Box<[u64]>[src]
impl FromWasmAbi for Box<[u64]>[src]impl FromWasmAbi for Box<[i64]>[src]
impl FromWasmAbi for Box<[i64]>[src]impl FromWasmAbi for Box<[usize]>[src]
impl FromWasmAbi for Box<[usize]>[src]impl FromWasmAbi for Box<[isize]>[src]
impl FromWasmAbi for Box<[isize]>[src]impl FromWasmAbi for Box<[f32]>[src]
impl FromWasmAbi for Box<[f32]>[src]impl FromWasmAbi for Box<[f64]>[src]
impl FromWasmAbi for Box<[f64]>[src]impl<T> FromWasmAbi for Vec<T> where
Box<[T]>: FromWasmAbi<Abi = WasmSlice>, [src]
impl<T> FromWasmAbi for Vec<T> where
Box<[T]>: FromWasmAbi<Abi = WasmSlice>, [src]impl FromWasmAbi for String[src]
impl FromWasmAbi for String[src]impl FromWasmAbi for Box<[JsValue]>[src]
impl FromWasmAbi for Box<[JsValue]>[src]Implementors
impl<T: FromWasmAbi> FromWasmAbi for Clamped<T>[src]
impl<T: FromWasmAbi> FromWasmAbi for Clamped<T>[src]