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
Init
Resolve
Before
After
Trait Implementations
sourceimpl Clone for PromiseHookType
impl Clone for PromiseHookType
sourcefn clone(&self) -> PromiseHookType
fn clone(&self) -> PromiseHookType
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for PromiseHookType
impl Debug for PromiseHookType
sourceimpl PartialEq<PromiseHookType> for PromiseHookType
impl PartialEq<PromiseHookType> for PromiseHookType
sourcefn 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 ==
. Read more
impl Copy for PromiseHookType
impl StructuralPartialEq for PromiseHookType
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more