Module wasm_bindgen::convert
source · Expand description
This is mostly an internal module, no stability guarantees are provided. Use at your own risk.
Structs
- A repr(C) struct containing all of the primitives of a
WasmAbitype, in order.
Traits
- A trait for anything that can be recovered by-value from the wasm ABI boundary, eg a Rust
u8can be recovered from the wasm ABIu32type. - A trait for anything that can be converted into a type that can cross the wasm ABI directly, eg
u32orf64. - A version of the
RefFromWasmAbitrait with the additional requirement that the reference must remain valid as long as the anchor isn’t dropped. - Indicates that this type can be received from JS as
Option<Self>. - Indicates that this type can be passed to JS as
Option<Self>. - A trait for anything that can be recovered as some sort of shared reference from the wasm ABI boundary.
- Dual of the
RefFromWasmAbitrait, except for mutable references. - A trait representing how to interpret the return value of a function for the wasm ABI.
- Trait for element types to implement FromWasmAbi for vectors of themselves.
- Trait for element types to implement IntoWasmAbi for vectors of themselves.
- A trait which represents types that can be passed across the Wasm ABI boundary, by being split into multiple Wasm primitive types.
- A trait for any type which maps to a Wasm primitive type when used in FFI (
i32,i64,f32, orf64).