pub trait RaceOk {
type Output;
type Error;
type Future: Future<Output = Result<Self::Output, Self::Error>>;
// Required method
fn race_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.