pub struct ObjectData {
pub proto: Option<Gc<JsObject>>,
pub props: Vec<(String, Property)>,
pub kind: ObjectKind,
pub extensible: bool,
pub elements_writable: bool,
}Expand description
The mutable half of an object.
Fields§
§proto: Option<Gc<JsObject>>The prototype, or None for Object.prototype and for a null-prototype
object created with Object.create(null).
props: Vec<(String, Property)>Properties in definition order.
kind: ObjectKindWhat kind of object this is.
extensible: boolWhether new properties may be added. Object.preventExtensions, seal and
freeze clear it, and nothing clears it back.
elements_writable: boolWhether array elements may be replaced.
Elements are not in the property table, so their attributes need somewhere to
live; Object.freeze clears this and Object.isFrozen reads it. A single
non-writable element is recorded in the property table instead, which is what
Object.defineProperty(a, "3", {configurable: false}) does.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for ObjectData
impl !Send for ObjectData
impl !Sync for ObjectData
impl !UnwindSafe for ObjectData
impl Forget for ObjectData
impl Freeze for ObjectData
impl Move for ObjectData
impl Unpin for ObjectData
impl UnsafeUnpin for ObjectData
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