pub trait RaceOk {
    type Output;
    type Error;
    type Future: Future<Output = Result<Self::Output, Self::Error>>;

    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.

Required Associated Types

The resulting output type.

The resulting error type.

Which kind of future are we turning this into?

Required Methods

Waits for the first successful future to complete.

Implementations on Foreign Types

Implementors