devela::_dep::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;
}
Available on crate feature dep_js_sys only.
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 [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]

Source§

impl RefFromWasmAbi for [MaybeUninit<f32>]

Source§

impl RefFromWasmAbi for [MaybeUninit<f64>]

Source§

impl RefFromWasmAbi for [MaybeUninit<i8>]

Source§

impl RefFromWasmAbi for [MaybeUninit<i16>]

Source§

impl RefFromWasmAbi for [MaybeUninit<i32>]

Source§

impl RefFromWasmAbi for [MaybeUninit<i64>]

Source§

impl RefFromWasmAbi for [MaybeUninit<isize>]

Source§

impl RefFromWasmAbi for [MaybeUninit<u8>]

Source§

impl RefFromWasmAbi for [MaybeUninit<u16>]

Source§

impl RefFromWasmAbi for [MaybeUninit<u32>]

Source§

impl RefFromWasmAbi for [MaybeUninit<u64>]

Source§

impl RefFromWasmAbi for [MaybeUninit<usize>]

Implementors§

Source§

impl RefFromWasmAbi for JsValue

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