pub trait AsJs {
// Required methods
fn to_js(&self) -> Result<JsValue, JsValue>;
fn from_js(js_value: JsValue) -> Result<Self, JsValue>
where Self: Sized;
}Expand description
An object-safe version of std::convert::Into.
pub trait AsJs {
// Required methods
fn to_js(&self) -> Result<JsValue, JsValue>;
fn from_js(js_value: JsValue) -> Result<Self, JsValue>
where Self: Sized;
}An object-safe version of std::convert::Into.