Skip to main content

ExtractFromJs

Trait ExtractFromJs 

Source
pub trait ExtractFromJs<'a>: Sized {
    // Required method
    fn extract(js_cb: &'a mut JsCallback) -> Result<Self, NjError>;

    // Provided method
    fn label() -> &'static str { ... }
}
Expand description

#[deprecated(since = “4.1.0”,“No longer used”]

Required Methods§

Source

fn extract(js_cb: &'a mut JsCallback) -> Result<Self, NjError>

extract from js callback

Provided Methods§

Source

fn label() -> &'static str

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<'a, T> ExtractFromJs<'a> for Option<T>
where T: JSValue<'a>,

for optional argument

Source§

fn label() -> &'static str

Source§

fn extract(js_cb: &'a mut JsCallback) -> Result<Option<T>, NjError>

Implementors§

Source§

impl ExtractFromJs<'_> for JsEnv

Source§

impl<'a, T> ExtractFromJs<'a> for T
where T: JSValue<'a>,