[][src]Struct nj_core::ThreadSafeFunction

pub struct ThreadSafeFunction { /* fields omitted */ }

Wrapper for thread safe function that are safe to send and sync across thread

Implementations

impl ThreadSafeFunction[src]

pub fn new<E>(env: E, tf: napi_threadsafe_function) -> Self where
    E: Into<JsEnv>, 
[src]

pub fn inner(self) -> napi_threadsafe_function[src]

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

pub fn call(&self, data: Option<*mut c_void>) -> Result<(), NjError>[src]

Trait Implementations

impl Drop for ThreadSafeFunction[src]

impl Send for ThreadSafeFunction[src]

impl Sync for ThreadSafeFunction[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> Instrument for T[src]

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

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.