Skip to main content

JsObject

Trait JsObject 

Source
pub trait JsObject {
Show 17 methods // Required methods fn get_object_base_mut(&mut self) -> &mut ObjectBase; fn get_object_base(&self) -> &ObjectBase; fn as_js_object(&self) -> &dyn JsObject; fn as_js_object_mut(&mut self) -> &mut dyn JsObject; // Provided methods fn get_prototype_of(&self) -> Option<JsObjectType> { ... } fn set_prototype_of(&mut self, prototype: Option<JsObjectType>) -> bool { ... } fn is_extensible(&self) -> bool { ... } fn prevent_extensions(&mut self) -> bool { ... } fn get_own_property( &self, property: &PropertyKey, ) -> Result<Option<&PropertyDescriptor>, JErrorType> { ... } fn define_own_property( &mut self, property: PropertyKey, descriptor_setter: PropertyDescriptorSetter, ) -> Result<bool, JErrorType> { ... } fn has_property(&self, property: &PropertyKey) -> bool { ... } fn get( &self, ctx_stack: &mut ExecutionContextStack, property: &PropertyKey, receiver: JsValueOrSelf<'_>, ) -> Result<JsValue, JErrorType> { ... } fn set( &mut self, ctx_stack: &mut ExecutionContextStack, property: PropertyKey, value: JsValue, receiver: JsValueOrSelf<'_>, ) -> Result<bool, JErrorType> { ... } fn delete(&mut self, property: &PropertyKey) -> Result<bool, JErrorType> { ... } fn enumerate(&self) -> JsIteratorObject { ... } fn own_property_keys( &self, ctx_stack: &mut ExecutionContextStack, ) -> Vec<PropertyKey> { ... } fn to_string(&self) -> String { ... }
}

Required Methods§

Source

fn get_object_base_mut(&mut self) -> &mut ObjectBase

Source

fn get_object_base(&self) -> &ObjectBase

Source

fn as_js_object(&self) -> &dyn JsObject

Source

fn as_js_object_mut(&mut self) -> &mut dyn JsObject

Provided Methods§

Source

fn get_prototype_of(&self) -> Option<JsObjectType>

Source

fn set_prototype_of(&mut self, prototype: Option<JsObjectType>) -> bool

Source

fn is_extensible(&self) -> bool

Source

fn prevent_extensions(&mut self) -> bool

Source

fn get_own_property( &self, property: &PropertyKey, ) -> Result<Option<&PropertyDescriptor>, JErrorType>

Source

fn define_own_property( &mut self, property: PropertyKey, descriptor_setter: PropertyDescriptorSetter, ) -> Result<bool, JErrorType>

Source

fn has_property(&self, property: &PropertyKey) -> bool

Source

fn get( &self, ctx_stack: &mut ExecutionContextStack, property: &PropertyKey, receiver: JsValueOrSelf<'_>, ) -> Result<JsValue, JErrorType>

Source

fn set( &mut self, ctx_stack: &mut ExecutionContextStack, property: PropertyKey, value: JsValue, receiver: JsValueOrSelf<'_>, ) -> Result<bool, JErrorType>

Source

fn delete(&mut self, property: &PropertyKey) -> Result<bool, JErrorType>

Source

fn enumerate(&self) -> JsIteratorObject

Source

fn own_property_keys( &self, ctx_stack: &mut ExecutionContextStack, ) -> Vec<PropertyKey>

Source

fn to_string(&self) -> String

Implementors§