pub trait TryStreamAndThenExt: TryStream {
// Required method
fn and_then_concurrent<Fut, F>(
self,
f: F,
) -> AndThenConcurrent<Self, Fut, F>
where Self: Sized,
Fut: TryFuture<Error = Self::Error>,
F: FnMut(Self::Ok) -> Fut;
}Expand description
Extension to futures_util::stream::TryStreamExt
Required Methods§
Sourcefn and_then_concurrent<Fut, F>(self, f: F) -> AndThenConcurrent<Self, Fut, F>
fn and_then_concurrent<Fut, F>(self, f: F) -> AndThenConcurrent<Self, Fut, F>
Chain a computation when a stream value is ready, passing Ok values to the closure f.
This function is similar to futures_util::stream::TryStreamExt::and_then, but the
stream is polled concurrently with the futures returned by f. An unbounded number of
futures corresponding to past stream values is kept via FuturesUnordered.
See crate-level docs for an explanation and usage example.