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.

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.

Implementations on Foreign Types§

source§

impl IntoWasmAbi for u16

§

type Abi = u32

source§

fn into_abi(self) -> u32

source§

impl IntoWasmAbi for Option<f64>

§

type Abi = WasmOption<f64>

source§

fn into_abi(self) -> Self::Abi

source§

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

source§

impl<T> IntoWasmAbi for *mut T

§

type Abi = u32

source§

fn into_abi(self) -> u32

source§

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

source§

impl IntoWasmAbi for Box<[usize]>

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)where A: FromWasmAbi, B: FromWasmAbi, C: FromWasmAbi, D: FromWasmAbi, E: FromWasmAbi, F: FromWasmAbi, G: FromWasmAbi, H: FromWasmAbi, R: ReturnWasmAbi,

source§

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

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)where A: FromWasmAbi, B: FromWasmAbi, C: FromWasmAbi, D: FromWasmAbi, E: FromWasmAbi, F: FromWasmAbi, G: FromWasmAbi, H: FromWasmAbi, R: ReturnWasmAbi,

source§

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

source§

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

source§

impl IntoWasmAbi for f64

§

type Abi = f64

source§

fn into_abi(self) -> f64

source§

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

source§

impl IntoWasmAbi for u64

§

type Abi = u64

source§

fn into_abi(self) -> u64

source§

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

source§

impl IntoWasmAbi for Option<i64>

§

type Abi = WasmOption<i64>

source§

fn into_abi(self) -> Self::Abi

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)where A: FromWasmAbi, B: FromWasmAbi, C: FromWasmAbi, D: FromWasmAbi, E: FromWasmAbi, F: FromWasmAbi, R: ReturnWasmAbi,

source§

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

source§

impl IntoWasmAbi for isize

§

type Abi = i32

source§

fn into_abi(self) -> i32

source§

impl IntoWasmAbi for Box<[i16]>

source§

impl IntoWasmAbi for bool

§

type Abi = u32

source§

fn into_abi(self) -> u32

source§

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

source§

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

source§

impl IntoWasmAbi for Box<[i64]>

source§

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

§

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

source§

fn into_abi(self) -> Self::Abi

source§

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

source§

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

source§

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

source§

impl IntoWasmAbi for char

§

type Abi = u32

source§

fn into_abi(self) -> u32

source§

impl IntoWasmAbi for Box<[u8]>

source§

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

source§

impl IntoWasmAbi for Option<usize>

§

type Abi = WasmOption<u32>

source§

fn into_abi(self) -> Self::Abi

source§

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

source§

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

source§

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

source§

impl IntoWasmAbi for Box<[u32]>

source§

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

source§

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

source§

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

source§

impl IntoWasmAbi for String

§

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

source§

fn into_abi(self) -> Self::Abi

source§

impl IntoWasmAbi for Box<[JsValue]>

source§

impl IntoWasmAbi for i16

§

type Abi = u32

source§

fn into_abi(self) -> u32

source§

impl IntoWasmAbi for i32

§

type Abi = i32

source§

fn into_abi(self) -> i32

source§

impl IntoWasmAbi for Option<u32>

§

type Abi = WasmOption<u32>

source§

fn into_abi(self) -> Self::Abi

source§

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

§

type Abi = <T as IntoWasmAbi>::Abi

source§

fn into_abi(self) -> T::Abi

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

impl<T> IntoWasmAbi for Box<[T]>where T: JsObject,

source§

impl IntoWasmAbi for Box<[i8]>

source§

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

source§

impl IntoWasmAbi for Box<[i32]>

source§

impl IntoWasmAbi for Box<[f64]>

source§

impl<T> IntoWasmAbi for *const T

§

type Abi = u32

source§

fn into_abi(self) -> u32

source§

impl IntoWasmAbi for i8

§

type Abi = u32

source§

fn into_abi(self) -> u32

source§

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

source§

impl IntoWasmAbi for Option<i32>

§

type Abi = WasmOption<i32>

source§

fn into_abi(self) -> Self::Abi

source§

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

source§

impl IntoWasmAbi for Box<[u64]>

source§

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

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)where A: FromWasmAbi, B: FromWasmAbi, C: FromWasmAbi, D: FromWasmAbi, E: FromWasmAbi, F: FromWasmAbi, G: FromWasmAbi, R: ReturnWasmAbi,

source§

impl IntoWasmAbi for f32

§

type Abi = f32

source§

fn into_abi(self) -> f32

source§

impl<'a> IntoWasmAbi for &'a str

§

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

source§

fn into_abi(self) -> Self::Abi

source§

impl IntoWasmAbi for ()

§

type Abi = ()

source§

fn into_abi(self)

source§

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

source§

impl IntoWasmAbi for Box<[f32]>

source§

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

source§

impl IntoWasmAbi for i64

§

type Abi = i64

source§

fn into_abi(self) -> i64

source§

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

source§

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

source§

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

source§

impl IntoWasmAbi for Box<[u16]>

source§

impl IntoWasmAbi for Box<[isize]>

source§

impl IntoWasmAbi for Option<f32>

§

type Abi = WasmOption<f32>

source§

fn into_abi(self) -> Self::Abi

source§

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

source§

impl IntoWasmAbi for u8

§

type Abi = u32

source§

fn into_abi(self) -> u32

source§

impl IntoWasmAbi for Option<isize>

§

type Abi = WasmOption<i32>

source§

fn into_abi(self) -> Self::Abi

source§

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

source§

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

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)where A: FromWasmAbi, B: FromWasmAbi, C: FromWasmAbi, D: FromWasmAbi, E: FromWasmAbi, F: FromWasmAbi, G: FromWasmAbi, R: ReturnWasmAbi,

source§

impl IntoWasmAbi for usize

§

type Abi = u32

source§

fn into_abi(self) -> u32

source§

impl IntoWasmAbi for Option<u64>

§

type Abi = WasmOption<u64>

source§

fn into_abi(self) -> Self::Abi

source§

impl IntoWasmAbi for u32

§

type Abi = u32

source§

fn into_abi(self) -> u32

Implementors§

source§

impl IntoWasmAbi for JsError

source§

impl IntoWasmAbi for JsValue

§

type Abi = u32

source§

impl<'a> IntoWasmAbi for &'a JsValue

§

type Abi = u32

source§

impl<'a, T> IntoWasmAbi for &'a Closure<T>where T: WasmClosure + ?Sized,

§

type Abi = u32

source§

impl<T: IntoWasmAbi> IntoWasmAbi for Clamped<T>

§

type Abi = <T as IntoWasmAbi>::Abi