pub struct Promise<T, E> { /* private fields */ }
Expand description
A computation that might eventually resolve to a value of type T
or to an error
of type E
. Dropping the promise cancels the computation.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<T, E> Freeze for Promise<T, E>
impl<T, E> !RefUnwindSafe for Promise<T, E>
impl<T, E> !Send for Promise<T, E>
impl<T, E> !Sync for Promise<T, E>
impl<T, E> Unpin for Promise<T, E>
impl<T, E> !UnwindSafe for Promise<T, E>
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
source§impl<F> IntoFuture for Fwhere
F: Future,
impl<F> IntoFuture for Fwhere
F: Future,
source§type IntoFuture = F
type IntoFuture = F
Which kind of future are we turning this into?
source§fn into_future(self) -> <F as IntoFuture>::IntoFuture
fn into_future(self) -> <F as IntoFuture>::IntoFuture
Creates a future from a value. Read more