Trait node_bindgen::core::val::ExtractArgFromJs

source ·
pub trait ExtractArgFromJs<'a>: Sized {
    // Required method
    fn convert_arg_at(
        js_cb: &'a JsCallback,
        index: usize,
    ) -> Result<Self, NjError>;

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

Required Methods§

source

fn convert_arg_at(js_cb: &'a JsCallback, index: usize) -> Result<Self, NjError>

convert js callback argument at index

Provided Methods§

source

fn label() -> &'static str

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<'a, T> ExtractArgFromJs<'a> for Option<T>
where T: JSValue<'a>,

source§

fn label() -> &'static str

source§

fn convert_arg_at( js_cb: &'a JsCallback, index: usize, ) -> Result<Option<T>, NjError>

Implementors§

source§

impl ExtractArgFromJs<'_> for JsEnv

source§

impl<'a, T> ExtractArgFromJs<'a> for T
where T: JSValue<'a> + ?Sized,