Module convert
⚠️ Unstable
This is an internal module, no stability guarantees are provided. Use at your own risk.
Structs
Traits
-
FromWasmAbi
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. -
IntoJsGeneric
Value conversion from a type into its canonical
JsGenericform. -
IntoWasmAbi
A trait for anything that can be converted into a type that can cross the
Wasm ABI directly, eg
u32orf64. -
JsGeneric
A convenience trait for types that erase to
JsValue. - JsStringLike Marker for types that cross the ABI as a JavaScript string.
-
LongRefFromWasmAbi
A version of the
RefFromWasmAbitrait with the additional requirement that the reference must remain valid as long as the anchor isn't dropped. -
OptionFromWasmAbi
Indicates that this type can be received from JS as
Option<Self>. -
OptionIntoWasmAbi
Indicates that this type can be passed to JS as
Option<Self>. - RefFromWasmAbi A trait for anything that can be recovered as some sort of shared reference from the Wasm ABI boundary.
-
RefMutFromWasmAbi
Dual of the
RefFromWasmAbitrait, except for mutable references. - ReturnWasmAbi A trait representing how to interpret the return value of a function for the Wasm ABI.
-
TryFromJsValue
TryFromJsValueis a trait for converting a JavaScript value (JsValue) into a Rust type. It is used by thewasm_bindgenproc-macro to allow conversion to user types. - Upcast A trait for type-safe generic upcasting.
- UpcastFrom A trait for defining upcast relationships from a source type.
- VectorFromWasmAbi Trait for element types to implement FromWasmAbi for vectors of themselves.
- VectorIntoWasmAbi Trait for element types to implement IntoWasmAbi for vectors of themselves.
-
VectorRefIntoWasmAbi
Internal trait used by the
slice_to_arraymacro codegen. - WasmAbi A trait which represents types that can be passed across the Wasm ABI boundary, by being split into multiple Wasm primitive types.
-
WasmPrimitive
A trait for any type which maps to a Wasm primitive type when used in FFI
(
i32,i64,f32, orf64).
Functions
-
js_value_vector_from_abi
⚠️ Unstable
-
js_value_vector_into_abi
⚠️ Unstable