pub trait RaceOk {
    type Output;
    type Error;

    fn race_ok<'async_trait>(
        self
    ) -> Pin<Box<dyn Future<Output = Result<Self::Output, Self::Error>> + 'async_trait>>
    where
        Self: 'async_trait
; }
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.

Required Methods

Waits for the first successful future to complete.

Implementations on Foreign Types

Implementors