Trait par_stream::prelude::TryParStreamExt
source · [−]pub trait TryParStreamExt where
Self: 'static + Send + TryStream,
Self::Ok: 'static + Send,
Self::Error: 'static + Send, {
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
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_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>,
Fallible stream combinator for map_blocking.
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_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,
Fallible stream combinator for par_batching.
Fallible stream combinator for par_then.
Fallible stream combinator for par_then_unordered.
Fallible stream combinator for par_map.
Fallible stream combinator for par_map_unordered.
Fallible stream combinator for par_for_each.
Fallible stream combinator for par_for_each_blocking.