[−][src]Trait boa::builtins::object::internal_methods_trait::ObjectInternalMethods
Here lies the internal methods for ordinary objects.
Most objects make use of these methods, including exotic objects like functions.
So thats why this is a trait
https://tc39.es/ecma262/#sec-ordinary-object-internal-methods-and-internal-slots
Required methods
fn get_own_property(&self, prop: &Value) -> Property
https://tc39.es/ecma262/#sec-ordinary-object-internal-methods-and-internal-slots-getownproperty-p The specification returns a Property Descriptor or Undefined. These are 2 separate types and we can't do that here.
fn set_prototype_of(&mut self, val: Value) -> bool
https://tc39.es/ecma262/#sec-ordinary-object-internal-methods-and-internal-slots-setprototypeof-v
fn define_own_property(&mut self, property_key: String, desc: Property) -> bool
fn get_internal_slot(&self, name: &str) -> Value
Utility function to get an immutable internal slot or Null
fn set_internal_slot(&mut self, name: &str, val: Value)
fn insert_property(&mut self, name: String, p: Property)
fn remove_property(&mut self, name: &str)
Provided methods
fn has_property(&self, val: &Value) -> bool
https://tc39.es/ecma262/#sec-ordinary-object-internal-methods-and-internal-slots-hasproperty-p
fn is_extensible(&self) -> bool
https://tc39.es/ecma262/#sec-ordinary-object-internal-methods-and-internal-slots-isextensible
fn prevent_extensions(&mut self) -> bool
https://tc39.es/ecma262/#sec-ordinary-object-internal-methods-and-internal-slots-preventextensions
fn delete(&mut self, prop_key: &Value) -> bool
fn get(&self, val: &Value) -> Value
fn set(&mut self, field: Value, val: Value) -> bool
[[Set]]
https://tc39.es/ecma262/#sec-ordinary-object-internal-methods-and-internal-slots-set-p-v-receiver
fn get_prototype_of(&self) -> Value
Returns either the prototype or null https://tc39.es/ecma262/#sec-ordinary-object-internal-methods-and-internal-slots-getprototypeof
Implementors
impl ObjectInternalMethods for Object
[src]
fn set_prototype_of(&mut self, val: Value) -> bool
[src]
https://tc39.es/ecma262/#sec-ordinary-object-internal-methods-and-internal-slots-setprototypeof-v
fn insert_property(&mut self, name: String, p: Property)
[src]
fn remove_property(&mut self, name: &str)
[src]
fn set_internal_slot(&mut self, name: &str, val: Value)
[src]
Utility function to set an internal slot
fn get_internal_slot(&self, name: &str) -> Value
[src]
Utility function to get an immutable internal slot or Null
fn get_own_property(&self, prop: &Value) -> Property
[src]
https://tc39.es/ecma262/#sec-ordinary-object-internal-methods-and-internal-slots-getownproperty-p The specification returns a Property Descriptor or Undefined. These are 2 separate types and we can't do that here.