pub struct PromiseReaction {
pub on_fulfilled: Option<Value>,
pub on_rejected: Option<Value>,
pub promise: Gc<JsObject>,
}Expand description
One then registration.
Fields§
§on_fulfilled: Option<Value>Called with the value if the promise fulfils.
on_rejected: Option<Value>Called with the reason if it rejects.
promise: Gc<JsObject>The promise to settle with whatever the handler returns.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for PromiseReaction
impl !Send for PromiseReaction
impl !Sync for PromiseReaction
impl !UnwindSafe for PromiseReaction
impl Forget for PromiseReaction
impl Freeze for PromiseReaction
impl Move for PromiseReaction
impl Unpin for PromiseReaction
impl UnsafeUnpin for PromiseReactionwhere
*const GcBox<JsString> is !null: UnsafeUnpin,
*const GcBox<JsObject> is !null: UnsafeUnpin,
*const GcBox<JsSymbol> is !null: UnsafeUnpin,
*const GcBox<BigInt> is !null: UnsafeUnpin,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more