[−][src]Struct node_bindgen::core::val::JsObject
represent arbitrary js object
Implementations
impl JsObject[src]
pub fn new(env: JsEnv, napi_value: *mut napi_value__) -> JsObject[src]
create js object from js object
pub fn create(env: &JsEnv) -> Result<JsObject, NjError>[src]
create new js object from env
pub fn env(&self) -> &JsEnv[src]
pub fn napi_value(&self) -> *mut napi_value__[src]
pub fn get_property(&self, key: &str) -> Result<Option<JsObject>, NjError>[src]
get property
pub fn set_property(
&mut self,
key: &str,
property_value: *mut napi_value__
) -> Result<(), NjError>[src]
&mut self,
key: &str,
property_value: *mut napi_value__
) -> Result<(), NjError>
pub fn as_value<'a, T>(&'a self) -> Result<T, NjError> where
T: JSValue<'a>, [src]
T: JSValue<'a>,
convert to equivalent rust object
Trait Implementations
impl<'_> JSValue<'_> for JsObject[src]
pub fn convert_to_rust(
env: &JsEnv,
js_value: *mut napi_value__
) -> Result<JsObject, NjError>[src]
env: &JsEnv,
js_value: *mut napi_value__
) -> Result<JsObject, NjError>
pub fn label() -> &'static str[src]
impl Send for JsObject[src]
impl TryIntoJs for JsObject[src]
Auto Trait Implementations
impl RefUnwindSafe for JsObject[src]
impl !Sync for JsObject[src]
impl Unpin for JsObject[src]
impl UnwindSafe for JsObject[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<'a, T> ExtractArgFromJs<'a> for T where
T: JSValue<'a> + ?Sized, [src]
T: JSValue<'a> + ?Sized,
pub fn label() -> &'static str[src]
pub fn convert_arg_at(js_cb: &'a JsCallback, index: usize) -> Result<T, NjError>[src]
impl<'a, T> ExtractFromJs<'a> for T where
T: JSValue<'a> + ?Sized, [src]
T: JSValue<'a> + ?Sized,
pub fn label() -> &'static str[src]
pub fn extract(js_cb: &'a mut JsCallback) -> Result<T, NjError>[src]
impl<T> From<T> for T[src]
impl<T> Instrument for T[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>[src]
pub fn in_current_span(self) -> Instrumented<Self>[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,