pub trait FromWasm: Sized {
type Wire;
// Required method
fn from_wire(wire: Self::Wire) -> Result<Self, WireError>;
}Expand description
A type that can be received from JavaScript, crossing the ABI as Self::Wire.
Required Associated Types§
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl<T: FromWasm> FromWasm for Vec<T>
Vec<T> crosses as a vector of T’s wire type, so Vec<u8> stays Vec<u8> and reaches
JavaScript as a Uint8Array.
impl<T: FromWasm> FromWasm for Vec<T>
Vec<T> crosses as a vector of T’s wire type, so Vec<u8> stays Vec<u8> and reaches
JavaScript as a Uint8Array.