pub struct JsObject { /* private fields */ }
Expand description
represent arbitrary js object
Implementations§
Source§impl JsObject
impl JsObject
Sourcepub fn new(env: JsEnv, napi_value: *mut napi_value__) -> JsObject
pub fn new(env: JsEnv, napi_value: *mut napi_value__) -> JsObject
create js object from js object
pub fn env(&self) -> &JsEnv
pub fn napi_value(&self) -> *mut napi_value__
pub fn set_property( &mut self, key: &str, property_value: *mut napi_value__, ) -> Result<(), NjError>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for JsObject
impl RefUnwindSafe for JsObject
impl !Sync for JsObject
impl Unpin for JsObject
impl UnwindSafe for JsObject
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