Struct boa::object::Object [−][src]
pub struct Object {
pub data: ObjectData,
// some fields omitted
}Expand description
The internal representation of an JavaScript object.
Fields
data: ObjectDataThe type of the object.
Implementations
Return a new ObjectData struct, with kind set to Ordinary
ObjectCreate is used to specify the runtime creation of new ordinary objects.
More information:
Return a new Boolean object whose [[BooleanData]] internal slot is set to argument.
Return a new Number object whose [[NumberData]] internal slot is set to argument.
Return a new String object whose [[StringData]] internal slot is set to argument.
Return a new BigInt object whose [[BigIntData]] internal slot is set to argument.
Create a new native object of type T.
It determines if Object is a callable function with a [[Call]] internal method.
More information:
It determines if Object is a function object with a [[Construct]] internal method.
More information:
Checks if it is an ArrayIterator object.
Checks if it a Function object.
Checks if it a Boolean object.
Checks if it an ordinary object.
Sets the prototype instance of the object.
Similar to Value::new_object, but you can pass a prototype to create from, plus a kind
Returns true if it holds an Rust type that implements NativeObject.
Reeturn true if it is a native object and the native type is T.
Downcast a reference to the object,
if the object is type native object type T.
Downcast a mutable reference to the object,
if the object is type native object type T.
pub fn insert_property<K, P>(
&mut self,
key: K,
property: P
) -> Option<PropertyDescriptor> where
K: Into<PropertyKey>,
P: Into<PropertyDescriptor>,
pub fn insert_property<K, P>(
&mut self,
key: K,
property: P
) -> Option<PropertyDescriptor> where
K: Into<PropertyKey>,
P: Into<PropertyDescriptor>,
Inserts a field in the object properties without checking if it’s writable.
If a field was already in the object with the same name that a Some is returned
with that field, otherwise None is retuned.