AsJs

Trait AsJs 

Source
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.

Required Methods§

Source

fn to_js(&self) -> Result<JsValue, JsValue>

Source

fn from_js(js_value: JsValue) -> Result<Self, JsValue>
where Self: Sized,

Implementors§