wasm_bindgen::convert

Trait OptionIntoWasmAbi

Source
pub trait OptionIntoWasmAbi: IntoWasmAbi {
    // Required method
    fn none() -> Self::Abi;
}
Expand description

Indicates that this type can be passed to JS as Option<Self>.

This trait is used when implementing IntoWasmAbi for Option<T>.

§⚠️ 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§

Source

fn none() -> Self::Abi

Returns an ABI instance indicating “none”, which JS will interpret as the None branch of this option.

It should be guaranteed that the IntoWasmAbi can never produce the ABI value returned here.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl OptionIntoWasmAbi for bool

Source§

impl OptionIntoWasmAbi for char

Source§

impl OptionIntoWasmAbi for i8

Source§

impl OptionIntoWasmAbi for i16

Source§

impl OptionIntoWasmAbi for u8

Source§

impl OptionIntoWasmAbi for u16

Source§

impl OptionIntoWasmAbi for String

Source§

fn none() -> Self::Abi

Source§

impl<'a> OptionIntoWasmAbi for &'a str

Source§

fn none() -> Self::Abi

Source§

impl<'a> OptionIntoWasmAbi for &'a [f32]

Source§

impl<'a> OptionIntoWasmAbi for &'a [f64]

Source§

impl<'a> OptionIntoWasmAbi for &'a [i8]

Source§

impl<'a> OptionIntoWasmAbi for &'a [i16]

Source§

impl<'a> OptionIntoWasmAbi for &'a [i32]

Source§

impl<'a> OptionIntoWasmAbi for &'a [i64]

Source§

impl<'a> OptionIntoWasmAbi for &'a [isize]

Source§

impl<'a> OptionIntoWasmAbi for &'a [u8]

Source§

impl<'a> OptionIntoWasmAbi for &'a [u16]

Source§

impl<'a> OptionIntoWasmAbi for &'a [u32]

Source§

impl<'a> OptionIntoWasmAbi for &'a [u64]

Source§

impl<'a> OptionIntoWasmAbi for &'a [usize]

Source§

impl<'a> OptionIntoWasmAbi for &'a mut [f32]

Source§

impl<'a> OptionIntoWasmAbi for &'a mut [f64]

Source§

impl<'a> OptionIntoWasmAbi for &'a mut [i8]

Source§

impl<'a> OptionIntoWasmAbi for &'a mut [i16]

Source§

impl<'a> OptionIntoWasmAbi for &'a mut [i32]

Source§

impl<'a> OptionIntoWasmAbi for &'a mut [i64]

Source§

impl<'a> OptionIntoWasmAbi for &'a mut [isize]

Source§

impl<'a> OptionIntoWasmAbi for &'a mut [u8]

Source§

impl<'a> OptionIntoWasmAbi for &'a mut [u16]

Source§

impl<'a> OptionIntoWasmAbi for &'a mut [u32]

Source§

impl<'a> OptionIntoWasmAbi for &'a mut [u64]

Source§

impl<'a> OptionIntoWasmAbi for &'a mut [usize]

Source§

impl<T> OptionIntoWasmAbi for Box<[T]>
where Self: IntoWasmAbi<Abi = WasmSlice>,

Source§

impl<T> OptionIntoWasmAbi for Vec<T>
where Box<[T]>: IntoWasmAbi<Abi = WasmSlice>,

Source§

impl<T> OptionIntoWasmAbi for NonNull<T>

Implementors§

Source§

impl<'a, T> OptionIntoWasmAbi for &'a Closure<T>
where T: WasmClosure + ?Sized,