Module promise

Source
Expand description

Native representation of JS Promise values.

This implementation differs from the traditional Rust DOM object, because the reflector is provided by SpiderMonkey and has no knowledge of an associated native representation (ie. dom::Promise). This means that native instances use native reference counting (Rc) to ensure that no memory is leaked, which means that there can be multiple instances of native Promise values that refer to the same JS value yet are distinct native objects (ie. address equality for the native objects is meaningless).

Structsยง

Promise ๐Ÿ”’
WaitForAllFulfillmentHandler ๐Ÿ”’
The fulfillment handler for the list of promises in https://webidl.spec.whatwg.org/#wait-for-all.
WaitForAllRejectionHandler ๐Ÿ”’
The rejection handler for the list of promises in https://webidl.spec.whatwg.org/#wait-for-all.

Enumsยง

NativeHandlerTask ๐Ÿ”’

Constantsยง

SLOT_NATIVEHANDLER ๐Ÿ”’
SLOT_NATIVEHANDLER_TASK ๐Ÿ”’
_IMPL_DOMOBJECT_FOR_Promise ๐Ÿ”’

Traitsยง

PromiseHelper ๐Ÿ”’
Private helper to enable adding new methods to Rc<Promise>.

Functionsยง

create_native_handler_function ๐Ÿ”’
do_nothing_promise_executor ๐Ÿ”’ โš 
native_handler_callback ๐Ÿ”’ โš 
wait_for_all ๐Ÿ”’
https://webidl.spec.whatwg.org/#wait-for-all
wait_for_all_promise ๐Ÿ”’
https://webidl.spec.whatwg.org/#waiting-for-all-promise

Type Aliasesยง

WaitForAllFailureSteps ๐Ÿ”’
The failure steps of https://webidl.spec.whatwg.org/#wait-for-all
WaitForAllSuccessSteps ๐Ÿ”’
The success steps of https://webidl.spec.whatwg.org/#wait-for-all