Module script::dom::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

Enums

Constants

Traits

  • Private helper to enable adding new methods to Rc<Promise>.

Functions