Trait futures_concurrency::FirstOk
source · [−]pub trait FirstOk {
type Output;
type Error;
type Future: Future<Output = Result<Self::Output, Self::Error>>;
fn first_ok(self) -> Self::Future;
}
Expand description
Wait for the first successful future to complete.
Awaits multiple futures simultaneously, returning the output of the first future which completes. If no future completes successfully, returns an aggregate error of all failed futures.