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 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, 'b, A, B, C, D, E, F, G, H, R> IntoWasmAbi for &'a (dyn Fn(A, B, C, D, E, F, G, H) -> R + 'b)

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

impl<'a, 'b, R> IntoWasmAbi for &'a mut (dyn FnMut() -> R + 'b)
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§