pub enum PromiseOk<TOk: Send + 'static, TErr: Send + 'static> {
Immediate(TOk),
Promise(Promise<TOk, TErr>),
}
Expand description
A non-error result from a promise; can be either an immediate Ok value, or another promise to execute.
Similar in usage to futures::Async
, though returns a promise to exeute instead of
a simple NotReady
value.
Variants§
Trait Implementations§
Auto Trait Implementations§
impl<TOk, TErr> Freeze for PromiseOk<TOk, TErr>where
TOk: Freeze,
impl<TOk, TErr> RefUnwindSafe for PromiseOk<TOk, TErr>where
TOk: RefUnwindSafe,
impl<TOk, TErr> Send for PromiseOk<TOk, TErr>
impl<TOk, TErr> Sync for PromiseOk<TOk, TErr>where
TOk: Sync,
impl<TOk, TErr> Unpin for PromiseOk<TOk, TErr>where
TOk: Unpin,
impl<TOk, TErr> UnwindSafe for PromiseOk<TOk, TErr>where
TOk: UnwindSafe,
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