Struct futures_concurrency::array::FirstOk
source · [−]pub struct FirstOk<Fut, T, E, const N: usize>where
T: Debug,
Fut: Future<Output = Result<T, E>>,{ /* private fields */ }
Expand description
Waits for two similarly-typed futures to complete.
Awaits multiple futures simultaneously, returning the output of the futures once both complete.
Trait Implementations
sourceimpl<Fut, T, E, const N: usize> Debug for FirstOk<Fut, T, E, N>where
Fut: Future<Output = Result<T, E>> + Debug,
Fut::Output: Debug,
T: Debug,
impl<Fut, T, E, const N: usize> Debug for FirstOk<Fut, T, E, N>where
Fut: Future<Output = Result<T, E>> + Debug,
Fut::Output: Debug,
T: Debug,
sourceimpl<Fut, T, E, const N: usize> Future for FirstOk<Fut, T, E, N>where
T: Debug,
Fut: Future<Output = Result<T, E>>,
E: Debug,
impl<Fut, T, E, const N: usize> Future for FirstOk<Fut, T, E, N>where
T: Debug,
Fut: Future<Output = Result<T, E>>,
E: Debug,
impl<'pin, Fut, T, E, const N: usize> Unpin for FirstOk<Fut, T, E, N>where
T: Debug,
Fut: Future<Output = Result<T, E>>,
__FirstOk<'pin, Fut, T, E, N>: Unpin,
Auto Trait Implementations
impl<Fut, T, E, const N: usize> RefUnwindSafe for FirstOk<Fut, T, E, N>where
E: RefUnwindSafe,
Fut: RefUnwindSafe,
T: RefUnwindSafe,
impl<Fut, T, E, const N: usize> Send for FirstOk<Fut, T, E, N>where
E: Send,
Fut: Send,
T: Send,
impl<Fut, T, E, const N: usize> Sync for FirstOk<Fut, T, E, N>where
E: Sync,
Fut: Sync,
T: Sync,
impl<Fut, T, E, const N: usize> UnwindSafe for FirstOk<Fut, T, E, N>where
E: UnwindSafe,
Fut: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<F> IntoFuture for Fwhere
F: Future,
impl<F> IntoFuture for Fwhere
F: Future,
type IntoFuture = F
type IntoFuture = F
Which kind of future are we turning this into?
sourcefn into_future(self) -> <F as IntoFuture>::IntoFuture
fn into_future(self) -> <F as IntoFuture>::IntoFuture
Creates a future from a value. Read more