pub trait OptionIntoWasmAbi: IntoWasmAbi {
// Required method
fn none() -> Self::Abi;
}Expand description
Indicates that this type can be passed to JS as Option<Self> over its own
ABI, which has a spare value for None.
Implementing it provides MaybeIntoWasmAbi, which Option<T> converts
through; a type whose ABI has no spare value implements that trait
directly instead.
§⚠️ 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 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<'a> OptionIntoWasmAbi for &'a mut [MaybeUninit<f32>]
impl<'a> OptionIntoWasmAbi for &'a mut [MaybeUninit<f32>]
Source§impl<'a> OptionIntoWasmAbi for &'a mut [MaybeUninit<f64>]
impl<'a> OptionIntoWasmAbi for &'a mut [MaybeUninit<f64>]
Source§impl<'a> OptionIntoWasmAbi for &'a mut [MaybeUninit<i8>]
impl<'a> OptionIntoWasmAbi for &'a mut [MaybeUninit<i8>]
Source§impl<'a> OptionIntoWasmAbi for &'a mut [MaybeUninit<i16>]
impl<'a> OptionIntoWasmAbi for &'a mut [MaybeUninit<i16>]
Source§impl<'a> OptionIntoWasmAbi for &'a mut [MaybeUninit<i32>]
impl<'a> OptionIntoWasmAbi for &'a mut [MaybeUninit<i32>]
Source§impl<'a> OptionIntoWasmAbi for &'a mut [MaybeUninit<i64>]
impl<'a> OptionIntoWasmAbi for &'a mut [MaybeUninit<i64>]
Source§impl<'a> OptionIntoWasmAbi for &'a mut [MaybeUninit<isize>]
impl<'a> OptionIntoWasmAbi for &'a mut [MaybeUninit<isize>]
Source§impl<'a> OptionIntoWasmAbi for &'a mut [MaybeUninit<u8>]
impl<'a> OptionIntoWasmAbi for &'a mut [MaybeUninit<u8>]
Source§impl<'a> OptionIntoWasmAbi for &'a mut [MaybeUninit<u16>]
impl<'a> OptionIntoWasmAbi for &'a mut [MaybeUninit<u16>]
Source§impl<'a> OptionIntoWasmAbi for &'a mut [MaybeUninit<u32>]
impl<'a> OptionIntoWasmAbi for &'a mut [MaybeUninit<u32>]
Source§impl<'a> OptionIntoWasmAbi for &'a mut [MaybeUninit<u64>]
impl<'a> OptionIntoWasmAbi for &'a mut [MaybeUninit<u64>]
Source§impl<'a> OptionIntoWasmAbi for &'a mut [MaybeUninit<usize>]
impl<'a> OptionIntoWasmAbi for &'a mut [MaybeUninit<usize>]
Source§impl<T: VectorRefIntoWasmAbi> OptionIntoWasmAbi for &[T]
impl<T: VectorRefIntoWasmAbi> OptionIntoWasmAbi for &[T]
Source§impl<T> OptionIntoWasmAbi for Box<[T]>where
Self: IntoWasmAbi<Abi = WasmSlice>,
impl<T> OptionIntoWasmAbi for Box<[T]>where
Self: IntoWasmAbi<Abi = WasmSlice>,
Source§impl<T> OptionIntoWasmAbi for Vec<T>
impl<T> OptionIntoWasmAbi for Vec<T>
Implementors§
impl OptionIntoWasmAbi for &JsValue
impl OptionIntoWasmAbi for JsValue
impl OptionIntoWasmAbi for Null
impl OptionIntoWasmAbi for Undefined
impl<'__wbg_ref, T> OptionIntoWasmAbi for &'__wbg_ref JsNullable<T>
impl<'__wbg_ref, T> OptionIntoWasmAbi for &'__wbg_ref JsOption<T>
impl<'__wbg_ref> OptionIntoWasmAbi for &'__wbg_ref Null
impl<'__wbg_ref> OptionIntoWasmAbi for &'__wbg_ref Undefined
impl<'a, T: WasmDescribe> OptionIntoWasmAbi for &'a Nullable<T>
impl<T: NullableIntoWasmAbi> OptionIntoWasmAbi for Nullable<T>
Option<Nullable<T>> is None for T’s undefined ABI value.