pub trait TryWidebandExt<T, E>{
// Required method
fn widen_and_then<U, F, Fut, N>(
self,
n: N,
f: F,
) -> impl TryStream<Ok = U, Error = E, Item = Result<U, E>> + Send
where N: Into<Option<usize>>,
F: Fn(Self::Ok) -> Fut + Send,
Fut: TryFuture<Ok = U, Error = E, Output = Result<U, E>> + Send,
U: Send;
// Provided method
fn wide_and_then<U, F, Fut>(
self,
f: F,
) -> impl TryStream<Ok = U, Error = E, Item = Result<U, E>> + Send
where F: Fn(Self::Ok) -> Fut + Send,
Fut: TryFuture<Ok = U, Error = E, Output = Result<U, E>> + Send,
U: Send { ... }
}Expand description
Adds bounded concurrent transformations with ordered transform results.
Successful item futures may run ahead of downstream demand, and their results retain queue order. Source errors are propagated immediately and may overtake queued transformation futures.
Required Methods§
Sourcefn widen_and_then<U, F, Fut, N>(
self,
n: N,
f: F,
) -> impl TryStream<Ok = U, Error = E, Item = Result<U, E>> + Send
fn widen_and_then<U, F, Fut, N>( self, n: N, f: F, ) -> impl TryStream<Ok = U, Error = E, Item = Result<U, E>> + Send
Transforms successful items concurrently with an explicit width.
n limits in-flight item futures, while None selects the automatic
width; an explicit zero cannot make progress. Transformation results
retain queue order, while source errors may overtake them.
Provided Methods§
Sourcefn wide_and_then<U, F, Fut>(
self,
f: F,
) -> impl TryStream<Ok = U, Error = E, Item = Result<U, E>> + Send
fn wide_and_then<U, F, Fut>( self, f: F, ) -> impl TryStream<Ok = U, Error = E, Item = Result<U, E>> + Send
Transforms successful items concurrently with the automatic width.
Item futures may run ahead, but transformation results retain queue
order. Existing source errors bypass f and may overtake queued
futures.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".