logo
pub struct Object {
    pub data: ObjectData,
    /* private fields */
}
Expand description

The internal representation of an JavaScript object.

Fields

data: ObjectData

The 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 an Array object.

Checks if it is an ArrayIterator object.

Checks if it is a Map object.pub

Checks if it a String object.

Checks if it a Function object.

Checks if it a Symbol object.

Checks if it an Error object.

Checks if it a Boolean object.

Checks if it a Number object.

Checks if it a BigInt object.

Checks if it a RegExp object.

Checks if it an ordinary object.

Sets the prototype instance of the object.

More information

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.

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.

Trait Implementations

Formats the value using the given formatter. Read more

Return a new ObjectData struct, with kind set to Ordinary

Executes the destructor for this type. Read more
Converts to this type from the input type.
Marks all contained Gcs.
Increments the root-count of all contained Gcs.
Decrements the root-count of all contained Gcs.
Runs Finalize::finalize() on this object and all contained subobjects Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Convert the Rust type which implements NativeObject to a &dyn Any.
Convert the Rust type which implements NativeObject to a &mut dyn Any.
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.