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

Trait RefFromWasmAbi

source
pub trait RefFromWasmAbi: WasmDescribe {
    type Abi: WasmAbi;
    type Anchor: Deref<Target = Self>;

    // Required method
    unsafe fn ref_from_abi(js: Self::Abi) -> Self::Anchor;
}
Expand description

A trait for anything that can be recovered as some sort of shared reference from the Wasm ABI boundary.

This is the shared reference variant of the opposite operation as IntoWasmAbi.

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

source

type Abi: WasmAbi

The Wasm ABI type references to Self are recovered from.

source

type Anchor: Deref<Target = Self>

The type that holds the reference to Self for the duration of the invocation of the function that has an &Self parameter. This is required to ensure that the lifetimes don’t persist beyond one function call, and so that they remain anonymous.

Required Methods§

source

unsafe fn ref_from_abi(js: Self::Abi) -> Self::Anchor

Recover a Self::Anchor from Self::Abi.

§Safety

Same as FromWasmAbi::from_abi.

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 RefFromWasmAbi for str

source§

impl RefFromWasmAbi for CharacterData

source§

impl RefFromWasmAbi for Comment

source§

impl RefFromWasmAbi for Document

source§

impl RefFromWasmAbi for DocumentFragment

source§

impl RefFromWasmAbi for Element

source§

impl RefFromWasmAbi for EventListener

source§

impl RefFromWasmAbi for EventTarget

source§

impl RefFromWasmAbi for HtmlElement

source§

impl RefFromWasmAbi for Node

source§

impl RefFromWasmAbi for NodeList

source§

impl RefFromWasmAbi for Text

source§

impl RefFromWasmAbi for Window

source§

impl RefFromWasmAbi for [f32]

source§

impl RefFromWasmAbi for [f64]

source§

impl RefFromWasmAbi for [i8]

source§

impl RefFromWasmAbi for [i16]

source§

impl RefFromWasmAbi for [i32]

source§

impl RefFromWasmAbi for [i64]

source§

impl RefFromWasmAbi for [isize]

source§

impl RefFromWasmAbi for [u8]

source§

impl RefFromWasmAbi for [u16]

source§

impl RefFromWasmAbi for [u32]

source§

impl RefFromWasmAbi for [u64]

source§

impl RefFromWasmAbi for [usize]

Implementors§

source§

impl RefFromWasmAbi for AnimationEvent

source§

impl RefFromWasmAbi for BeforeUnloadEvent

source§

impl RefFromWasmAbi for CompositionEvent

source§

impl RefFromWasmAbi for DeviceMotionEvent

source§

impl RefFromWasmAbi for DeviceOrientationEvent

source§

impl RefFromWasmAbi for DragEvent

source§

impl RefFromWasmAbi for ErrorEvent

source§

impl RefFromWasmAbi for Event

source§

impl RefFromWasmAbi for FocusEvent

source§

impl RefFromWasmAbi for GamepadEvent

source§

impl RefFromWasmAbi for HashChangeEvent

source§

impl RefFromWasmAbi for InputEvent

source§

impl RefFromWasmAbi for KeyboardEvent

source§

impl RefFromWasmAbi for MessageEvent

source§

impl RefFromWasmAbi for MouseEvent

source§

impl RefFromWasmAbi for PageTransitionEvent

source§

impl RefFromWasmAbi for PointerEvent

source§

impl RefFromWasmAbi for PopStateEvent

source§

impl RefFromWasmAbi for ProgressEvent

source§

impl RefFromWasmAbi for PromiseRejectionEvent

source§

impl RefFromWasmAbi for SecurityPolicyViolationEvent

source§

impl RefFromWasmAbi for StorageEvent

source§

impl RefFromWasmAbi for SubmitEvent

source§

impl RefFromWasmAbi for TouchEvent

source§

impl RefFromWasmAbi for TransitionEvent

source§

impl RefFromWasmAbi for UiEvent

source§

impl RefFromWasmAbi for WheelEvent

source§

impl RefFromWasmAbi for Collator

source§

impl RefFromWasmAbi for DateTimeFormat

source§

impl RefFromWasmAbi for NumberFormat

source§

impl RefFromWasmAbi for PluralRules

source§

impl RefFromWasmAbi for RelativeTimeFormat

source§

impl RefFromWasmAbi for CompileError

source§

impl RefFromWasmAbi for Exception

source§

impl RefFromWasmAbi for Global

source§

impl RefFromWasmAbi for Instance

source§

impl RefFromWasmAbi for LinkError

source§

impl RefFromWasmAbi for Memory

source§

impl RefFromWasmAbi for Module

source§

impl RefFromWasmAbi for RuntimeError

source§

impl RefFromWasmAbi for Table

source§

impl RefFromWasmAbi for Tag

source§

impl RefFromWasmAbi for Array

source§

impl RefFromWasmAbi for ArrayBuffer

source§

impl RefFromWasmAbi for AsyncIterator

source§

impl RefFromWasmAbi for BigInt64Array

source§

impl RefFromWasmAbi for BigInt

source§

impl RefFromWasmAbi for BigUint64Array

source§

impl RefFromWasmAbi for Boolean

source§

impl RefFromWasmAbi for DataView

source§

impl RefFromWasmAbi for Date

source§

impl RefFromWasmAbi for Error

source§

impl RefFromWasmAbi for EvalError

source§

impl RefFromWasmAbi for Float32Array

source§

impl RefFromWasmAbi for Float64Array

source§

impl RefFromWasmAbi for Function

source§

impl RefFromWasmAbi for Generator

source§

impl RefFromWasmAbi for Int8Array

source§

impl RefFromWasmAbi for Int16Array

source§

impl RefFromWasmAbi for Int32Array

source§

impl RefFromWasmAbi for Iterator

source§

impl RefFromWasmAbi for IteratorNext

source§

impl RefFromWasmAbi for JsString

source§

impl RefFromWasmAbi for Map

source§

impl RefFromWasmAbi for Number

source§

impl RefFromWasmAbi for Object

source§

impl RefFromWasmAbi for Promise

source§

impl RefFromWasmAbi for Proxy

source§

impl RefFromWasmAbi for RangeError

source§

impl RefFromWasmAbi for ReferenceError

source§

impl RefFromWasmAbi for RegExp

source§

impl RefFromWasmAbi for Set

source§

impl RefFromWasmAbi for SharedArrayBuffer

source§

impl RefFromWasmAbi for Symbol

source§

impl RefFromWasmAbi for SyntaxError

source§

impl RefFromWasmAbi for TypeError

source§

impl RefFromWasmAbi for Uint8Array

source§

impl RefFromWasmAbi for Uint8ClampedArray

source§

impl RefFromWasmAbi for Uint16Array

source§

impl RefFromWasmAbi for Uint32Array

source§

impl RefFromWasmAbi for UriError

source§

impl RefFromWasmAbi for WeakMap

source§

impl RefFromWasmAbi for WeakSet

source§

impl RefFromWasmAbi for JsValue