pub trait FromJs: Sized {
// Required method
fn from_js(js: &mut impl Js, value: Value) -> JsResult<Self>;
}Expand description
A Rust value made from a JavaScript value, as the specification’s
conversions make it (ToNumber, ToString, …). A conversion that may
run JavaScript runs it through js.
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: FromJs> FromJs for Vec<T>
An array-like: its length (ToLength), then each index; a non-object
is a TypeError.
impl<T: FromJs> FromJs for Vec<T>
An array-like: its length (ToLength), then each index; a non-object
is a TypeError.