Enum v8::PromiseHookType
source · #[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§
source§impl Clone for PromiseHookType
impl Clone for PromiseHookType
source§fn clone(&self) -> PromiseHookType
fn clone(&self) -> PromiseHookType
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for PromiseHookType
impl Debug for PromiseHookType
source§impl PartialEq<PromiseHookType> for PromiseHookType
impl PartialEq<PromiseHookType> for PromiseHookType
source§fn eq(&self, other: &PromiseHookType) -> bool
fn eq(&self, other: &PromiseHookType) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.