Trait FromWasmAbi
pub trait FromWasmAbi: WasmDescribe
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.
Associated Types
type Abi: WasmAbi;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) -> SelfRecover a
SelffromSelf::Abi.Safety
This is only safe to call when -- and implementations may assume that -- the supplied
Self::Abiwas previously generated by a call to<Self as IntoWasmAbi>::into_abi()or the moral equivalent in JS.
Implementors
impl FromWasmAbi for ()impl FromWasmAbi for JsErrorimpl FromWasmAbi for JsValueimpl FromWasmAbi for Nullimpl FromWasmAbi for Option<f32>impl FromWasmAbi for Option<f64>impl FromWasmAbi for Option<i128>impl FromWasmAbi for Option<i32>impl FromWasmAbi for Option<i64>impl FromWasmAbi for Option<isize>impl FromWasmAbi for Option<u128>impl FromWasmAbi for Option<u32>impl FromWasmAbi for Option<u64>impl FromWasmAbi for Option<usize>impl FromWasmAbi for Stringimpl FromWasmAbi for Undefinedimpl FromWasmAbi for boolimpl FromWasmAbi for charimpl FromWasmAbi for f32impl FromWasmAbi for f64impl FromWasmAbi for i128impl FromWasmAbi for i16impl FromWasmAbi for i32impl FromWasmAbi for i64impl FromWasmAbi for i8impl FromWasmAbi for isizeimpl FromWasmAbi for u128impl FromWasmAbi for u16impl FromWasmAbi for u32impl FromWasmAbi for u64impl FromWasmAbi for u8impl FromWasmAbi for usizeimpl<T> FromWasmAbi for *const Timpl<T> FromWasmAbi for *mut Timpl<T> FromWasmAbi for JsNullable<T>impl<T> FromWasmAbi for JsOption<T>impl<T> FromWasmAbi for NonNull<T>impl<T> FromWasmAbi for Option<*const T>impl<T> FromWasmAbi for Option<*mut T>impl<T> FromWasmAbi for Vec<T> where Box<[T]>: FromWasmAbi<Abi = WasmSlice>,impl<T: FromWasmAbi> FromWasmAbi for AssertUnwindSafe<T>impl<T: FromWasmAbi> FromWasmAbi for Clamped<T>impl<T: OptionFromWasmAbi> FromWasmAbi for Option<T>impl<T: VectorFromWasmAbi> FromWasmAbi for Box<[T]>