Struct chakracore::value::promise::Promise [] [src]

pub struct Promise(_);

A JavaScript promise.

To support promises within a context, see Context.

Methods

impl Promise
[src]

Creates a new promise with an associated executor.

Returns true if the value is a Promise.

impl Promise
[src]

Creates an instance from a raw pointer.

This is used for managing the lifetime of JSRT objects. They are tracked using reference counting; incrementing with from_raw, and decrementing with drop.

This is required to support items stored on the heap, since the JSRT runtime only observes the stack.

If used in conjunction with a Property or any Value, it is assumed a Context is active.

Returns the underlying raw pointer.

Methods from Deref<Target = Object>

Sets an object's property's value.

Sets an object's index value.

Returns an object's property's value.

Returns an object's index value.

Deletes an object's property.

Deletes an object's index.

Determines whether an object has a property.

Determines whether an object has a value at the specified index.

Defines or modifies a property directly on an object.

This is equivalent to Object.defineProperty().

Sets the object's prototype. This will result in an error if it's called on the context's global object.

Returns the object's prototype.

Returns the object's property names

Makes an object non-extensible.

Returns whether the object is extensible or not.

Sets a callback that is executed before the object is collected.

This is highly unsafe to use. There is no bookkeeping whether any other caller replaces the current callback or not. It is also used internally by Function to cleanup user data (if it's replaced, memory will leak).

Returns the underlying raw pointer.

Trait Implementations

impl Clone for Promise
[src]

Duplicates a reference counted type.

The underlying pointer will be copied, and its reference count will be incremented, returned wrapped as the type.

Performs copy-assignment from source. Read more

impl Drop for Promise
[src]

Decrements the reference counter if the object is recyclable.

impl Deref for Promise
[src]

The resulting type after dereferencing

The method called to dereference a value