Trait wasm_bindgen::convert::WasmPrimitive
source · pub unsafe trait WasmPrimitive: Default { }
Expand description
A trait for any type which maps to a Wasm primitive type when used in FFI
(i32
, i64
, f32
, or f64
).
This is with the exception of ()
(and other zero-sized types), which are
also allowed because they’re ignored: no arguments actually get added.
§Safety
This is an unsafe trait to implement as there’s no guarantee the type actually maps to a primitive type.
Object Safety§
This trait is not object safe.