pub trait FromWasmAbi: WasmDescribe {
type Abi: WasmAbi;
// Required method
unsafe fn from_abi(js: Self::Abi) -> Self;
}Expand description
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.
§⚠️ 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.
Required Associated Types§
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl FromWasmAbi for String
impl FromWasmAbi for String
Source§impl FromWasmAbi for isize
impl FromWasmAbi for isize
Source§impl FromWasmAbi for usize
impl FromWasmAbi for usize
Source§impl<T: FromWasmAbi> FromWasmAbi for AssertUnwindSafe<T>
impl<T: FromWasmAbi> FromWasmAbi for AssertUnwindSafe<T>
Source§impl<T: MaybeFromWasmAbi> FromWasmAbi for Option<T>
impl<T: MaybeFromWasmAbi> FromWasmAbi for Option<T>
Source§impl<T: VectorFromWasmAbi> FromWasmAbi for Box<[T]>
impl<T: VectorFromWasmAbi> FromWasmAbi for Box<[T]>
Source§impl<T> FromWasmAbi for *const T
impl<T> FromWasmAbi for *const T
Source§impl<T> FromWasmAbi for *mut T
impl<T> FromWasmAbi for *mut T
Source§impl<T> FromWasmAbi for NonNull<T>
impl<T> FromWasmAbi for NonNull<T>
Source§impl<T> FromWasmAbi for Vec<T>
impl<T> FromWasmAbi for Vec<T>
Implementors§
Source§impl FromWasmAbi for JsError
impl FromWasmAbi for JsError
Source§impl FromWasmAbi for Null
impl FromWasmAbi for Null
Source§impl FromWasmAbi for Undefined
impl FromWasmAbi for Undefined
Source§impl<T: FromWasmAbi> FromWasmAbi for Clamped<T>
impl<T: FromWasmAbi> FromWasmAbi for Clamped<T>
type Abi = <T as FromWasmAbi>::Abi
Source§impl<T: NullableFromWasmAbi> FromWasmAbi for Nullable<Option<T>>
T’s undefined test may cover its null sentinel too, as a slice’s
does with the null pointer, so Null is ruled out before the Option
reads the rest.
impl<T: NullableFromWasmAbi> FromWasmAbi for Nullable<Option<T>>
T’s undefined test may cover its null sentinel too, as a slice’s
does with the null pointer, so Null is ruled out before the Option
reads the rest.