Trait wasm_bindgen::convert::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.

Object Safety§

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,