pub trait TryParStreamExt{
// Required methods
fn try_map_blocking<B, T, F>(
self,
buf_size: B,
f: F,
) -> RecvStream<'static, Result<T, Self::Error>>
where B: Into<BufSize>,
T: Send,
F: 'static + Send + FnMut(Self::Ok) -> Result<T, Self::Error>;
fn try_par_batching<U, P, F, Fut>(
self,
params: P,
f: F,
) -> TryParBatching<U, Self::Error>
where Self: Sized,
P: Into<ParParams>,
F: 'static + Clone + Send + FnMut(usize, Receiver<Result<Self::Ok, Self::Error>>) -> Fut,
Fut: 'static + Future<Output = Result<Option<(U, Receiver<Result<Self::Ok, Self::Error>>)>, Self::Error>> + Send,
U: 'static + Send;
fn try_par_then<U, P, F, Fut>(
self,
params: P,
f: F,
) -> BoxStream<'static, Result<U, Self::Error>>
where P: Into<ParParams>,
U: 'static + Send,
F: 'static + FnMut(Self::Ok) -> Fut + Send,
Fut: 'static + Future<Output = Result<U, Self::Error>> + Send;
fn try_par_then_unordered<U, P, F, Fut>(
self,
params: P,
f: F,
) -> BoxStream<'static, Result<U, Self::Error>>
where U: 'static + Send,
F: 'static + FnMut(Self::Ok) -> Fut + Send,
Fut: 'static + Future<Output = Result<U, Self::Error>> + Send,
P: Into<ParParams>;
fn try_par_map<U, P, F, Func>(
self,
params: P,
f: F,
) -> BoxStream<'static, Result<U, Self::Error>>
where P: Into<ParParams>,
U: 'static + Send,
F: 'static + FnMut(Self::Ok) -> Func + Send,
Func: 'static + FnOnce() -> Result<U, Self::Error> + Send;
fn try_par_map_unordered<U, P, F, Func>(
self,
params: P,
f: F,
) -> BoxStream<'static, Result<U, Self::Error>>
where P: Into<ParParams>,
U: 'static + Send,
F: 'static + FnMut(Self::Ok) -> Func + Send,
Func: 'static + FnOnce() -> Result<U, Self::Error> + Send;
fn try_par_for_each<P, F, Fut>(
self,
params: P,
f: F,
) -> BoxFuture<'static, Result<(), Self::Error>>
where P: Into<ParParams>,
F: 'static + FnMut(Self::Ok) -> Fut + Send,
Fut: 'static + Future<Output = Result<(), Self::Error>> + Send;
fn try_par_for_each_blocking<P, F, Func>(
self,
params: P,
f: F,
) -> BoxFuture<'static, Result<(), Self::Error>>
where P: Into<ParParams>,
F: 'static + FnMut(Self::Ok) -> Func + Send,
Func: 'static + FnOnce() -> Result<(), Self::Error> + Send;
}
Expand description
The trait extends TryStream types with parallel processing combinators.
Required Methods§
Sourcefn try_map_blocking<B, T, F>(
self,
buf_size: B,
f: F,
) -> RecvStream<'static, Result<T, Self::Error>>
fn try_map_blocking<B, T, F>( self, buf_size: B, f: F, ) -> RecvStream<'static, Result<T, Self::Error>>
Fallible stream combinator for map_blocking.
Sourcefn try_par_batching<U, P, F, Fut>(
self,
params: P,
f: F,
) -> TryParBatching<U, Self::Error>
fn try_par_batching<U, P, F, Fut>( self, params: P, f: F, ) -> TryParBatching<U, Self::Error>
Fallible stream combinator for par_batching.
Sourcefn try_par_then<U, P, F, Fut>(
self,
params: P,
f: F,
) -> BoxStream<'static, Result<U, Self::Error>>
fn try_par_then<U, P, F, Fut>( self, params: P, f: F, ) -> BoxStream<'static, Result<U, Self::Error>>
Fallible stream combinator for par_then.
Sourcefn try_par_then_unordered<U, P, F, Fut>(
self,
params: P,
f: F,
) -> BoxStream<'static, Result<U, Self::Error>>
fn try_par_then_unordered<U, P, F, Fut>( self, params: P, f: F, ) -> BoxStream<'static, Result<U, Self::Error>>
Fallible stream combinator for par_then_unordered.
Sourcefn try_par_map<U, P, F, Func>(
self,
params: P,
f: F,
) -> BoxStream<'static, Result<U, Self::Error>>
fn try_par_map<U, P, F, Func>( self, params: P, f: F, ) -> BoxStream<'static, Result<U, Self::Error>>
Fallible stream combinator for par_map.
Sourcefn try_par_map_unordered<U, P, F, Func>(
self,
params: P,
f: F,
) -> BoxStream<'static, Result<U, Self::Error>>
fn try_par_map_unordered<U, P, F, Func>( self, params: P, f: F, ) -> BoxStream<'static, Result<U, Self::Error>>
Fallible stream combinator for par_map_unordered.
Sourcefn try_par_for_each<P, F, Fut>(
self,
params: P,
f: F,
) -> BoxFuture<'static, Result<(), Self::Error>>
fn try_par_for_each<P, F, Fut>( self, params: P, f: F, ) -> BoxFuture<'static, Result<(), Self::Error>>
Fallible stream combinator for par_for_each.
Sourcefn try_par_for_each_blocking<P, F, Func>(
self,
params: P,
f: F,
) -> BoxFuture<'static, Result<(), Self::Error>>
fn try_par_for_each_blocking<P, F, Func>( self, params: P, f: F, ) -> BoxFuture<'static, Result<(), Self::Error>>
Fallible stream combinator for par_for_each_blocking.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.