pub enum PromiseState {
Pending,
Resolved(Value),
Rejected(Error),
Cancelled,
}Expand description
Lifecycle of a promise.
Variants§
Pending
Waiting for its producing call.
Resolved(Value)
Resolved with a value.
Rejected(Error)
Failed; the original error is preserved so the class survives the hop.
Cancelled
Cancelled by the caller; never resolves.
Implementations§
Source§impl PromiseState
impl PromiseState
pub fn is_settled(&self) -> bool
Trait Implementations§
Source§impl Clone for PromiseState
impl Clone for PromiseState
Source§impl Debug for PromiseState
impl Debug for PromiseState
Source§impl PartialEq for PromiseState
impl PartialEq for PromiseState
impl StructuralPartialEq for PromiseState
Auto Trait Implementations§
impl Freeze for PromiseState
impl RefUnwindSafe for PromiseState
impl Send for PromiseState
impl Sync for PromiseState
impl Unpin for PromiseState
impl UnsafeUnpin for PromiseState
impl UnwindSafe for PromiseState
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