pub struct ResultFuture<T: Task<U>, U> { /* private fields */ }
Expand description
Future returned by Task::result()
.
This future resolves to a Result<T, Error>
when the underlying task completes,
allowing explicit handling of task panics and other errors without propagating them.
Trait Implementations§
Source§impl<T: Task<U>, U> Debug for ResultFuture<T, U>
impl<T: Task<U>, U> Debug for ResultFuture<T, U>
Source§impl<T: Task<U>, U> Future for ResultFuture<T, U>
impl<T: Task<U>, U> Future for ResultFuture<T, U>
Auto Trait Implementations§
impl<T, U> Freeze for ResultFuture<T, U>where
T: Freeze,
impl<T, U> RefUnwindSafe for ResultFuture<T, U>where
T: RefUnwindSafe,
U: RefUnwindSafe,
impl<T, U> Send for ResultFuture<T, U>
impl<T, U> Sync for ResultFuture<T, U>
impl<T, U> Unpin for ResultFuture<T, U>
impl<T, U> UnwindSafe for ResultFuture<T, U>where
T: UnwindSafe,
U: 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
Source§impl<F> FutureExt for F
impl<F> FutureExt for F
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