Trait boa_engine::value::TryFromJs
source · pub trait TryFromJs: Sized {
// Required method
fn try_from_js(value: &JsValue, context: &mut Context) -> JsResult<Self>;
}
Expand description
This trait adds a fallible and efficient conversions from a JsValue
to Rust types.
Required Methods§
sourcefn try_from_js(value: &JsValue, context: &mut Context) -> JsResult<Self>
fn try_from_js(value: &JsValue, context: &mut Context) -> JsResult<Self>
This function tries to convert a JavaScript value into Self
.
Object Safety§
This trait is not object safe.