pub trait TryFutureConsumer {
type Ok;
type Err;
// Required method
fn try_fut_consume(
self,
func: impl FnMut(Self::Ok) + Send,
) -> impl Future<Output = Result<(), Self::Err>>;
}Expand description
Like FutureConsumer, but for fallible futures.
Spawns all futures concurrently. Calls func for each Ok value as it
arrives. On the first Err, cancels remaining tasks and returns that error.
Required Associated Types§
Required Methods§
fn try_fut_consume( self, func: impl FnMut(Self::Ok) + Send, ) -> impl Future<Output = Result<(), Self::Err>>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".