wasm_bindgen::convert

Trait IntoWasmAbi

Source
pub trait IntoWasmAbi: WasmDescribe {
    type Abi: WasmAbi;

    // Required method
    fn into_abi(self) -> Self::Abi;
}
Expand description

A trait for anything that can be converted into a type that can cross the Wasm ABI directly, eg u32 or f64.

This is the opposite operation as FromWasmAbi and Ref[Mut]FromWasmAbi.

§⚠️ 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 that this converts into when crossing the ABI boundary.

Required Methods§

Source

fn into_abi(self) -> Self::Abi

Convert self into Self::Abi so that it can be sent across the wasm ABI boundary.

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 IntoWasmAbi for Option<f32>

Source§

type Abi = f64

Source§

fn into_abi(self) -> Self::Abi

Source§

impl IntoWasmAbi for Option<f64>

Source§

type Abi = Option<f64>

Source§

fn into_abi(self) -> Self::Abi

Source§

impl IntoWasmAbi for Option<i32>

Source§

type Abi = f64

Source§

fn into_abi(self) -> Self::Abi

Source§

impl IntoWasmAbi for Option<i64>

Source§

type Abi = Option<i64>

Source§

fn into_abi(self) -> Self::Abi

Source§

impl IntoWasmAbi for Option<i128>

Source§

type Abi = Option<i128>

Source§

fn into_abi(self) -> Self::Abi

Source§

impl IntoWasmAbi for Option<isize>

Source§

type Abi = f64

Source§

fn into_abi(self) -> Self::Abi

Source§

impl IntoWasmAbi for Option<u32>

Source§

type Abi = f64

Source§

fn into_abi(self) -> Self::Abi

Source§

impl IntoWasmAbi for Option<u64>

Source§

type Abi = Option<u64>

Source§

fn into_abi(self) -> Self::Abi

Source§

impl IntoWasmAbi for Option<u128>

Source§

type Abi = Option<u128>

Source§

fn into_abi(self) -> Self::Abi

Source§

impl IntoWasmAbi for Option<usize>

Source§

type Abi = f64

Source§

fn into_abi(self) -> Self::Abi

Source§

impl IntoWasmAbi for bool

Source§

impl IntoWasmAbi for char

Source§

impl IntoWasmAbi for f32

Source§

impl IntoWasmAbi for f64

Source§

impl IntoWasmAbi for i8

Source§

impl IntoWasmAbi for i16

Source§

impl IntoWasmAbi for i32

Source§

impl IntoWasmAbi for i64

Source§

impl IntoWasmAbi for i128

Source§

impl IntoWasmAbi for isize

Source§

impl IntoWasmAbi for u8

Source§

impl IntoWasmAbi for u16

Source§

impl IntoWasmAbi for u32

Source§

impl IntoWasmAbi for u64

Source§

impl IntoWasmAbi for u128

Source§

impl IntoWasmAbi for ()

Source§

impl IntoWasmAbi for usize

Source§

impl IntoWasmAbi for String

Source§

type Abi = <Vec<u8> as IntoWasmAbi>::Abi

Source§

fn into_abi(self) -> Self::Abi

Source§

impl<'a> IntoWasmAbi for &'a str

Source§

type Abi = <&'a [u8] as IntoWasmAbi>::Abi

Source§

fn into_abi(self) -> Self::Abi

Source§

impl<'a> IntoWasmAbi for &'a [f32]

Source§

impl<'a> IntoWasmAbi for &'a [f64]

Source§

impl<'a> IntoWasmAbi for &'a [i8]

Source§

impl<'a> IntoWasmAbi for &'a [i16]

Source§

impl<'a> IntoWasmAbi for &'a [i32]

Source§

impl<'a> IntoWasmAbi for &'a [i64]

Source§

impl<'a> IntoWasmAbi for &'a [isize]

Source§

impl<'a> IntoWasmAbi for &'a [u8]

Source§

impl<'a> IntoWasmAbi for &'a [u16]

Source§

impl<'a> IntoWasmAbi for &'a [u32]

Source§

impl<'a> IntoWasmAbi for &'a [u64]

Source§

impl<'a> IntoWasmAbi for &'a [usize]

Source§

impl<'a> IntoWasmAbi for &'a [MaybeUninit<f32>]

Source§

impl<'a> IntoWasmAbi for &'a [MaybeUninit<f64>]

Source§

impl<'a> IntoWasmAbi for &'a [MaybeUninit<i8>]

Source§

impl<'a> IntoWasmAbi for &'a [MaybeUninit<i16>]

Source§

impl<'a> IntoWasmAbi for &'a [MaybeUninit<i32>]

Source§

impl<'a> IntoWasmAbi for &'a [MaybeUninit<i64>]

Source§

impl<'a> IntoWasmAbi for &'a [MaybeUninit<isize>]

Source§

impl<'a> IntoWasmAbi for &'a [MaybeUninit<u8>]

Source§

impl<'a> IntoWasmAbi for &'a [MaybeUninit<u16>]

Source§

impl<'a> IntoWasmAbi for &'a [MaybeUninit<u32>]

Source§

impl<'a> IntoWasmAbi for &'a [MaybeUninit<u64>]

Source§

impl<'a> IntoWasmAbi for &'a [MaybeUninit<usize>]

Source§

impl<'a> IntoWasmAbi for &'a mut [f32]

Source§

impl<'a> IntoWasmAbi for &'a mut [f64]

Source§

impl<'a> IntoWasmAbi for &'a mut [i8]

Source§

impl<'a> IntoWasmAbi for &'a mut [i16]

Source§

impl<'a> IntoWasmAbi for &'a mut [i32]

Source§

impl<'a> IntoWasmAbi for &'a mut [i64]

Source§

impl<'a> IntoWasmAbi for &'a mut [isize]

Source§

impl<'a> IntoWasmAbi for &'a mut [u8]

Source§

impl<'a> IntoWasmAbi for &'a mut [u16]

Source§

impl<'a> IntoWasmAbi for &'a mut [u32]

Source§

impl<'a> IntoWasmAbi for &'a mut [u64]

Source§

impl<'a> IntoWasmAbi for &'a mut [usize]

Source§

impl<'a> IntoWasmAbi for &'a mut [MaybeUninit<f32>]

Source§

impl<'a> IntoWasmAbi for &'a mut [MaybeUninit<f64>]

Source§

impl<'a> IntoWasmAbi for &'a mut [MaybeUninit<i8>]

Source§

impl<'a> IntoWasmAbi for &'a mut [MaybeUninit<i16>]

Source§

impl<'a> IntoWasmAbi for &'a mut [MaybeUninit<i32>]

Source§

impl<'a> IntoWasmAbi for &'a mut [MaybeUninit<i64>]

Source§

impl<'a> IntoWasmAbi for &'a mut [MaybeUninit<isize>]

Source§

impl<'a> IntoWasmAbi for &'a mut [MaybeUninit<u8>]

Source§

impl<'a> IntoWasmAbi for &'a mut [MaybeUninit<u16>]

Source§

impl<'a> IntoWasmAbi for &'a mut [MaybeUninit<u32>]

Source§

impl<'a> IntoWasmAbi for &'a mut [MaybeUninit<u64>]

Source§

impl<'a> IntoWasmAbi for &'a mut [MaybeUninit<usize>]

Source§

impl<A, B, C, D, E, F, G, H, R> IntoWasmAbi for &(dyn Fn(A, B, C, D, E, F, G, H) -> R + '_)

Source§

impl<A, B, C, D, E, F, G, H, R> IntoWasmAbi for &mut (dyn FnMut(A, B, C, D, E, F, G, H) -> R + '_)

Source§

impl<A, B, C, D, E, F, G, R> IntoWasmAbi for &(dyn Fn(A, B, C, D, E, F, G) -> R + '_)

Source§

impl<A, B, C, D, E, F, G, R> IntoWasmAbi for &mut (dyn FnMut(A, B, C, D, E, F, G) -> R + '_)

Source§

impl<A, B, C, D, E, F, R> IntoWasmAbi for &(dyn Fn(A, B, C, D, E, F) -> R + '_)

Source§

impl<A, B, C, D, E, F, R> IntoWasmAbi for &mut (dyn FnMut(A, B, C, D, E, F) -> R + '_)

Source§

impl<A, B, C, D, E, R> IntoWasmAbi for &(dyn Fn(A, B, C, D, E) -> R + '_)

Source§

impl<A, B, C, D, E, R> IntoWasmAbi for &mut (dyn FnMut(A, B, C, D, E) -> R + '_)

Source§

impl<A, B, C, D, R> IntoWasmAbi for &(dyn Fn(A, B, C, D) -> R + '_)

Source§

impl<A, B, C, D, R> IntoWasmAbi for &mut (dyn FnMut(A, B, C, D) -> R + '_)

Source§

impl<A, B, C, R> IntoWasmAbi for &(dyn Fn(A, B, C) -> R + '_)

Source§

impl<A, B, C, R> IntoWasmAbi for &mut (dyn FnMut(A, B, C) -> R + '_)

Source§

impl<A, B, R> IntoWasmAbi for &(dyn Fn(A, B) -> R + '_)

Source§

impl<A, B, R> IntoWasmAbi for &mut (dyn FnMut(A, B) -> R + '_)

Source§

impl<A, R> IntoWasmAbi for &(dyn Fn(&A) -> R + '_)

Source§

impl<A, R> IntoWasmAbi for &(dyn Fn(A) -> R + '_)

Source§

impl<A, R> IntoWasmAbi for &mut (dyn FnMut(&A) -> R + '_)

Source§

impl<A, R> IntoWasmAbi for &mut (dyn FnMut(A) -> R + '_)

Source§

impl<R> IntoWasmAbi for &(dyn Fn() -> R + '_)
where R: ReturnWasmAbi,

Source§

impl<R> IntoWasmAbi for &mut (dyn FnMut() -> R + '_)
where R: ReturnWasmAbi,

Source§

impl<T> IntoWasmAbi for Option<*const T>

Source§

impl<T> IntoWasmAbi for Option<*mut T>

Source§

impl<T> IntoWasmAbi for *const T

Source§

impl<T> IntoWasmAbi for *mut T

Source§

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

Source§

type Abi = <Box<[T]> as IntoWasmAbi>::Abi

Source§

fn into_abi(self) -> Self::Abi

Source§

impl<T> IntoWasmAbi for NonNull<T>

Source§

impl<T: OptionIntoWasmAbi> IntoWasmAbi for Option<T>

Source§

type Abi = <T as IntoWasmAbi>::Abi

Source§

fn into_abi(self) -> T::Abi

Source§

impl<T: VectorIntoWasmAbi> IntoWasmAbi for Box<[T]>

Source§

type Abi = <T as VectorIntoWasmAbi>::Abi

Source§

fn into_abi(self) -> Self::Abi

Implementors§