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.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl IntoWasmAbi for Option<f32>

source§

type Abi = Option<f32>

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 = Option<i32>

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<isize>

source§

type Abi = Option<i32>

source§

fn into_abi(self) -> Self::Abi

source§

impl IntoWasmAbi for Option<u32>

source§

type Abi = Option<u32>

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<usize>

source§

type Abi = Option<u32>

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 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 ()

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§