pub struct JSObjectData {
pub properties: HashMap<PropertyKey, Rc<RefCell<Value>>>,
pub constants: HashSet<String>,
pub prototype: Option<Rc<RefCell<JSObjectData>>>,
pub is_function_scope: bool,
}Fields§
§properties: HashMap<PropertyKey, Rc<RefCell<Value>>>§constants: HashSet<String>§prototype: Option<Rc<RefCell<JSObjectData>>>§is_function_scope: boolImplementations§
Source§impl JSObjectData
impl JSObjectData
pub fn new() -> Self
pub fn insert(&mut self, key: PropertyKey, val: Rc<RefCell<Value>>)
pub fn get(&self, key: &PropertyKey) -> Option<Rc<RefCell<Value>>>
pub fn contains_key(&self, key: &PropertyKey) -> bool
pub fn remove(&mut self, key: &PropertyKey) -> Option<Rc<RefCell<Value>>>
pub fn keys(&self) -> Keys<'_, PropertyKey, Rc<RefCell<Value>>>
pub fn is_const(&self, key: &str) -> bool
pub fn set_const(&mut self, key: String)
Trait Implementations§
Source§impl Clone for JSObjectData
impl Clone for JSObjectData
Source§fn clone(&self) -> JSObjectData
fn clone(&self) -> JSObjectData
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for JSObjectData
impl Debug for JSObjectData
Source§impl Default for JSObjectData
impl Default for JSObjectData
Source§fn default() -> JSObjectData
fn default() -> JSObjectData
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for JSObjectData
impl !RefUnwindSafe for JSObjectData
impl !Send for JSObjectData
impl !Sync for JSObjectData
impl Unpin for JSObjectData
impl !UnwindSafe for JSObjectData
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