pub trait FromJsValue: Sized {
type WasmAbi: FromWasmAbi;
// Required methods
fn from_js_value(value: &JsValue) -> Result<Self>;
fn from_wasm_abi(abi: Self::WasmAbi) -> Result<Self>;
// Provided method
fn from_fn_result(result: &Result<JsValue, JsValue>) -> Result<Self> { ... }
}
Required Associated Types§
type WasmAbi: FromWasmAbi
Required Methods§
fn from_js_value(value: &JsValue) -> Result<Self>
fn from_wasm_abi(abi: Self::WasmAbi) -> Result<Self>
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.