Skip to main content

MaybeFromWasmAbi

Trait MaybeFromWasmAbi 

Source
pub trait MaybeFromWasmAbi: FromWasmAbi {
    type MaybeAbi: WasmAbi;

    // Required methods
    unsafe fn from_maybe_abi(abi: Self::MaybeAbi) -> Self;
    fn is_none(abi: &Self::MaybeAbi) -> bool;
}
Expand description

The ABI of Option<Self> received from JS. See MaybeIntoWasmAbi.

§⚠️ 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 MaybeAbi: WasmAbi

The ABI of Option<Self>.

Required Methods§

Source

unsafe fn from_maybe_abi(abi: Self::MaybeAbi) -> Self

Recovers a value from the Option<Self> ABI, once is_none has ruled None out.

§Safety

As for FromWasmAbi::from_abi.

Source

fn is_none(abi: &Self::MaybeAbi) -> bool

Tests the ABI value for None.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl MaybeFromWasmAbi for f32

Source§

type MaybeAbi = f64

Source§

unsafe fn from_maybe_abi(js: f64) -> Self

Source§

fn is_none(js: &f64) -> bool

Source§

impl MaybeFromWasmAbi for f64

Source§

type MaybeAbi = MaybeAbi<f64>

Source§

unsafe fn from_maybe_abi(js: MaybeAbi<f64>) -> Self

Source§

fn is_none(js: &MaybeAbi<f64>) -> bool

Source§

impl MaybeFromWasmAbi for i32

Source§

type MaybeAbi = f64

Source§

unsafe fn from_maybe_abi(js: f64) -> Self

Source§

fn is_none(js: &f64) -> bool

Source§

impl MaybeFromWasmAbi for i64

Source§

type MaybeAbi = MaybeAbi<i64>

Source§

unsafe fn from_maybe_abi(js: MaybeAbi<i64>) -> Self

Source§

fn is_none(js: &MaybeAbi<i64>) -> bool

Source§

impl MaybeFromWasmAbi for i128

Source§

type MaybeAbi = MaybeAbi<i128>

Source§

unsafe fn from_maybe_abi(js: MaybeAbi<i128>) -> Self

Source§

fn is_none(js: &MaybeAbi<i128>) -> bool

Source§

impl MaybeFromWasmAbi for isize

Source§

type MaybeAbi = f64

Source§

unsafe fn from_maybe_abi(js: f64) -> Self

Source§

fn is_none(js: &f64) -> bool

Source§

impl MaybeFromWasmAbi for u32

Source§

type MaybeAbi = f64

Source§

unsafe fn from_maybe_abi(js: f64) -> Self

Source§

fn is_none(js: &f64) -> bool

Source§

impl MaybeFromWasmAbi for u64

Source§

type MaybeAbi = MaybeAbi<u64>

Source§

unsafe fn from_maybe_abi(js: MaybeAbi<u64>) -> Self

Source§

fn is_none(js: &MaybeAbi<u64>) -> bool

Source§

impl MaybeFromWasmAbi for u128

Source§

type MaybeAbi = MaybeAbi<u128>

Source§

unsafe fn from_maybe_abi(js: MaybeAbi<u128>) -> Self

Source§

fn is_none(js: &MaybeAbi<u128>) -> bool

Source§

impl MaybeFromWasmAbi for usize

Source§

type MaybeAbi = f64

Source§

unsafe fn from_maybe_abi(js: f64) -> Self

Source§

fn is_none(js: &f64) -> bool

Source§

impl<T> MaybeFromWasmAbi for *const T

Source§

type MaybeAbi = f64

Source§

unsafe fn from_maybe_abi(js: f64) -> Self

Source§

fn is_none(js: &f64) -> bool

Source§

impl<T> MaybeFromWasmAbi for *mut T

Source§

type MaybeAbi = f64

Source§

unsafe fn from_maybe_abi(js: f64) -> Self

Source§

fn is_none(js: &f64) -> bool

Implementors§