devela::_dep::js_sys::wasm_bindgen::convert

Trait OptionFromWasmAbi

Source
pub trait OptionFromWasmAbi: FromWasmAbi {
    // Required method
    fn is_none(abi: &Self::Abi) -> bool;
}
Available on crate feature dep_js_sys only.
Expand description

Indicates that this type can be received from JS as Option<Self>.

This trait is used when implementing FromWasmAbi 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 is_none(abi: &Self::Abi) -> bool

Tests whether the argument is a “none” instance. If so it will be deserialized as None, and otherwise it will be passed to FromWasmAbi.

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 OptionFromWasmAbi for bool

Source§

impl OptionFromWasmAbi for char

Source§

impl OptionFromWasmAbi for i8

Source§

impl OptionFromWasmAbi for i16

Source§

impl OptionFromWasmAbi for u8

Source§

impl OptionFromWasmAbi for u16

Implementors§

Source§

impl OptionFromWasmAbi for String

Source§

impl OptionFromWasmAbi for Collator

Source§

impl OptionFromWasmAbi for DateTimeFormat

Source§

impl OptionFromWasmAbi for NumberFormat

Source§

impl OptionFromWasmAbi for PluralRules

Source§

impl OptionFromWasmAbi for RelativeTimeFormat

Source§

impl OptionFromWasmAbi for CompileError

Source§

impl OptionFromWasmAbi for Exception

Source§

impl OptionFromWasmAbi for Global

Source§

impl OptionFromWasmAbi for Instance

Source§

impl OptionFromWasmAbi for LinkError

Source§

impl OptionFromWasmAbi for Memory

Source§

impl OptionFromWasmAbi for Module

Source§

impl OptionFromWasmAbi for RuntimeError

Source§

impl OptionFromWasmAbi for Table

Source§

impl OptionFromWasmAbi for Tag

Source§

impl OptionFromWasmAbi for Array

Source§

impl OptionFromWasmAbi for ArrayBuffer

Source§

impl OptionFromWasmAbi for AsyncIterator

Source§

impl OptionFromWasmAbi for BigInt64Array

Source§

impl OptionFromWasmAbi for BigInt

Source§

impl OptionFromWasmAbi for BigUint64Array

Source§

impl OptionFromWasmAbi for Boolean

Source§

impl OptionFromWasmAbi for DataView

Source§

impl OptionFromWasmAbi for Date

Source§

impl OptionFromWasmAbi for Error

Source§

impl OptionFromWasmAbi for EvalError

Source§

impl OptionFromWasmAbi for Float32Array

Source§

impl OptionFromWasmAbi for Float64Array

Source§

impl OptionFromWasmAbi for Function

Source§

impl OptionFromWasmAbi for Generator

Source§

impl OptionFromWasmAbi for Int8Array

Source§

impl OptionFromWasmAbi for Int16Array

Source§

impl OptionFromWasmAbi for Int32Array

Source§

impl OptionFromWasmAbi for Iterator

Source§

impl OptionFromWasmAbi for IteratorNext

Source§

impl OptionFromWasmAbi for JsString

Source§

impl OptionFromWasmAbi for Map

Source§

impl OptionFromWasmAbi for Number

Source§

impl OptionFromWasmAbi for Object

Source§

impl OptionFromWasmAbi for Promise

Source§

impl OptionFromWasmAbi for Proxy

Source§

impl OptionFromWasmAbi for RangeError

Source§

impl OptionFromWasmAbi for ReferenceError

Source§

impl OptionFromWasmAbi for RegExp

Source§

impl OptionFromWasmAbi for Set

Source§

impl OptionFromWasmAbi for SharedArrayBuffer

Source§

impl OptionFromWasmAbi for Symbol

Source§

impl OptionFromWasmAbi for SyntaxError

Source§

impl OptionFromWasmAbi for TypeError

Source§

impl OptionFromWasmAbi for Uint8Array

Source§

impl OptionFromWasmAbi for Uint8ClampedArray

Source§

impl OptionFromWasmAbi for Uint16Array

Source§

impl OptionFromWasmAbi for Uint32Array

Source§

impl OptionFromWasmAbi for UriError

Source§

impl OptionFromWasmAbi for WeakMap

Source§

impl OptionFromWasmAbi for WeakSet

Source§

impl<T> OptionFromWasmAbi for Box<[T]>
where Box<[T]>: FromWasmAbi<Abi = WasmSlice>,

Source§

impl<T> OptionFromWasmAbi for NonNull<T>

Source§

impl<T> OptionFromWasmAbi for Vec<T>
where Box<[T]>: FromWasmAbi<Abi = WasmSlice>,