AsJSValue

Trait AsJSValue 

Source
pub trait AsJSValue<'a>: Deref<Target = JSValue<'a>> + AsRef<JSValue<'a>> {
    // Required methods
    fn into_value(self) -> JSValue<'a>;
    fn as_value(&self) -> &JSValue<'a>;
}
Expand description

A trait for converting a type into a JSValue.

Types implementing this trait are JSValue, we are wrapping them in other types to provide specific functionality.

Required Methods§

Source

fn into_value(self) -> JSValue<'a>

Source

fn as_value(&self) -> &JSValue<'a>

Implementors§

Source§

impl<'a> AsJSValue<'a> for JSObject<'a>

Source§

impl<'a> AsJSValue<'a> for JSTypedArray<'a>