Trait TryParStreamExt

Source
pub trait TryParStreamExt
where Self: 'static + Send + TryStream, Self::Ok: 'static + Send, Self::Error: 'static + Send,
{ // 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§

Source

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.

Source

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.

Source

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,

Fallible stream combinator for par_then.

Source

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>,

Fallible stream combinator for par_then_unordered.

Source

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,

Fallible stream combinator for par_map.

Source

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,

Fallible stream combinator for par_map_unordered.

Source

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,

Fallible stream combinator for par_for_each.

Source

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,

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.

Implementors§

Source§

impl<S, T, E> TryParStreamExt for S
where Self: 'static + Send + Stream<Item = Result<T, E>>, T: 'static + Send, E: 'static + Send,