pub struct Ref<T> { /* private fields */ }Implementations§
Source§impl<T: FromNapiValue> Ref<T>
impl<T: FromNapiValue> Ref<T>
Source§impl<T: 'static + FromNapiMutRef> Ref<T>
impl<T: 'static + FromNapiMutRef> Ref<T>
Sourcepub fn get_value_mut(&self, env: &Env) -> Result<&mut T>
pub fn get_value_mut(&self, env: &Env) -> Result<&mut T>
Get the value reference from the reference
Trait Implementations§
Source§impl<'env, T: FromNapiValue + JsValue<'env>> FromNapiValue for Ref<T>
impl<'env, T: FromNapiValue + JsValue<'env>> FromNapiValue for Ref<T>
Source§unsafe fn from_napi_value(env: napi_env, value: napi_value) -> Result<Self>
unsafe fn from_napi_value(env: napi_env, value: napi_value) -> Result<Self>
Safety Read more
fn from_unknown(value: Unknown<'_>) -> Result<Self>
Source§impl<T: 'static> ToNapiValue for Ref<T>
impl<T: 'static> ToNapiValue for Ref<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
fn into_unknown(self, env: &Env) -> Result<Unknown<'_>>
impl<T> Send for Ref<T>
impl<T> Sync for Ref<T>
Auto Trait Implementations§
impl<T> Freeze for Ref<T>
impl<T> RefUnwindSafe for Ref<T>where
T: RefUnwindSafe,
impl<T> Unpin for Ref<T>where
T: Unpin,
impl<T> UnwindSafe for Ref<T>where
T: UnwindSafe,
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