sycamore::web::js_sys::wasm_bindgen::convert

Trait OptionFromWasmAbi

source
pub trait OptionFromWasmAbi: FromWasmAbi {
    // Required method
    fn is_none(abi: &Self::Abi) -> bool;
}
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

source§

impl OptionFromWasmAbi for String

source§

impl OptionFromWasmAbi for CharacterData

source§

impl OptionFromWasmAbi for Comment

source§

impl OptionFromWasmAbi for Document

source§

impl OptionFromWasmAbi for DocumentFragment

source§

impl OptionFromWasmAbi for Element

source§

impl OptionFromWasmAbi for EventListener

source§

impl OptionFromWasmAbi for EventTarget

source§

impl OptionFromWasmAbi for HtmlElement

source§

impl OptionFromWasmAbi for Node

source§

impl OptionFromWasmAbi for NodeList

source§

impl OptionFromWasmAbi for Text

source§

impl OptionFromWasmAbi for Window

source§

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

source§

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

source§

impl<T> OptionFromWasmAbi for NonNull<T>

Implementors§

source§

impl OptionFromWasmAbi for AnimationEvent

source§

impl OptionFromWasmAbi for BeforeUnloadEvent

source§

impl OptionFromWasmAbi for CompositionEvent

source§

impl OptionFromWasmAbi for DeviceMotionEvent

source§

impl OptionFromWasmAbi for DeviceOrientationEvent

source§

impl OptionFromWasmAbi for DragEvent

source§

impl OptionFromWasmAbi for ErrorEvent

source§

impl OptionFromWasmAbi for Event

source§

impl OptionFromWasmAbi for FocusEvent

source§

impl OptionFromWasmAbi for GamepadEvent

source§

impl OptionFromWasmAbi for HashChangeEvent

source§

impl OptionFromWasmAbi for InputEvent

source§

impl OptionFromWasmAbi for KeyboardEvent

source§

impl OptionFromWasmAbi for MessageEvent

source§

impl OptionFromWasmAbi for MouseEvent

source§

impl OptionFromWasmAbi for PageTransitionEvent

source§

impl OptionFromWasmAbi for PointerEvent

source§

impl OptionFromWasmAbi for PopStateEvent

source§

impl OptionFromWasmAbi for ProgressEvent

source§

impl OptionFromWasmAbi for PromiseRejectionEvent

source§

impl OptionFromWasmAbi for SecurityPolicyViolationEvent

source§

impl OptionFromWasmAbi for StorageEvent

source§

impl OptionFromWasmAbi for SubmitEvent

source§

impl OptionFromWasmAbi for TouchEvent

source§

impl OptionFromWasmAbi for TransitionEvent

source§

impl OptionFromWasmAbi for UiEvent

source§

impl OptionFromWasmAbi for WheelEvent

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