Enum v8::PromiseHookType [−][src]
#[repr(C)]
pub enum PromiseHookType {
Init,
Resolve,
Before,
After,
}
Expand description
PromiseHook with type Init is called when a new promise is created. When a new promise is created as part of the chain in the case of Promise.then or in the intermediate promises created by Promise.{race, all}/AsyncFunctionAwait, we pass the parent promise otherwise we pass undefined.
PromiseHook with type Resolve is called at the beginning of resolve or reject function defined by CreateResolvingFunctions.
PromiseHook with type Before is called at the beginning of the PromiseReactionJob.
PromiseHook with type After is called right at the end of the PromiseReactionJob.
Variants
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for PromiseHookType
impl Send for PromiseHookType
impl Sync for PromiseHookType
impl Unpin for PromiseHookType
impl UnwindSafe for PromiseHookType
Blanket Implementations
Mutably borrows from an owned value. Read more