Struct napi_h::bindgen_prelude::Reference
source · pub struct Reference<T: 'static> { /* private fields */ }
Expand description
§Experimental feature
Create a reference
from Class
instance.
Unref the Reference
when the Reference
is dropped.
Implementations§
Trait Implementations§
source§impl<T: 'static> FromNapiValue for Reference<T>
impl<T: 'static> FromNapiValue for Reference<T>
source§unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>
unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>
Safety Read more
fn from_unknown(value: JsUnknown) -> Result<Self>
source§impl<T: 'static> ToNapiValue for Reference<T>
impl<T: 'static> ToNapiValue for Reference<T>
source§unsafe fn to_napi_value(env: napi_env, val: Self) -> Result<napi_value>
unsafe fn to_napi_value(env: napi_env, val: Self) -> Result<napi_value>
Safety Read more
Auto Trait Implementations§
impl<T> Freeze for Reference<T>
impl<T> !RefUnwindSafe for Reference<T>
impl<T> !Send for Reference<T>
impl<T> !Sync for Reference<T>
impl<T> Unpin for Reference<T>
impl<T> !UnwindSafe for Reference<T>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more