pub trait Race {
    type Output;
    type Future: Future<Output = Self::Output>;

    fn race(self) -> Self::Future;
}
Expand description

Wait for the first future to complete.

Awaits multiple futures simultaneously, returning the output of the first future which completes.

Required Associated Types

The resulting output type.

Which kind of future are we turning this into?

Required Methods

Waits for multiple futures to complete.

Awaits multiple futures simultaneously, returning the output of the futures once both complete.

This function returns a new future which polls both futures concurrently.

Implementations on Foreign Types

Implementors