[][src]Struct node_bindgen::core::val::JsCallback

pub struct JsCallback { /* fields omitted */ }

Methods

impl JsCallback[src]

pub fn env(&self) -> &JsEnv[src]

pub fn args(&self, index: usize) -> *mut napi_value__[src]

pub fn this(&self) -> *mut napi_value__[src]

pub fn this_owned(self) -> *mut napi_value__[src]

pub fn get_value<T>(&self, index: usize) -> Result<T, NjError> where
    T: JSValue
[src]

get value of callback info and verify type

pub fn get_ref<T>(&self, index: usize) -> Result<&'static T, NjError>[src]

get reference to wrapper object

pub fn create_thread_safe_function(
    &self,
    name: &str,
    index: usize,
    call_js_cb: Option<unsafe extern "C" fn(*mut napi_env__, *mut napi_value__, *mut c_void, *mut c_void)>
) -> Result<ThreadSafeFunction, NjError>
[src]

pub fn unwrap_mut<T>(&self) -> Result<&'static mut T, NjError>[src]

pub fn unwrap<T>(&self) -> Result<&'static T, NjError>[src]

Trait Implementations

impl Clone for JsCallback[src]

impl Send for JsCallback[src]

impl Sync for JsCallback[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.