Trait par_stream::TryParStreamExt[][src]

pub trait TryParStreamExt {
Show 15 methods fn try_tee<T, E>(self, buf_size: impl Into<Option<usize>>) -> TryTee<T, E>
    where
        Self: 'static + Stream<Item = Result<T, E>> + Sized + Unpin + Send,
        T: 'static + Send + Clone,
        E: 'static + Send + Clone
, { ... }
fn try_wrapping_enumerate<T, E>(self) -> TryWrappingEnumerate<T, E, Self>
    where
        Self: Stream<Item = Result<T, E>> + Sized + Unpin + Send
, { ... }
fn try_reorder_enumerated<T, E>(self) -> TryReorderEnumerated<T, E, Self>
    where
        Self: Stream<Item = Result<(usize, T), E>> + Sized + Unpin + Send
, { ... }
fn try_par_then<T, F, Fut>(
        self,
        config: impl IntoParStreamParams,
        f: F
    ) -> TryParMap<T, Self::Error>
    where
        T: 'static + Send,
        F: 'static + FnMut(Self::Ok) -> Fut + Send,
        Fut: 'static + Future<Output = Result<T, Self::Error>> + Send,
        Self: 'static + TryStreamExt + Sized + Unpin + Send,
        Self::Ok: Send,
        Self::Error: Send
, { ... }
fn try_par_then_init<T, B, InitF, MapF, Fut>(
        self,
        config: impl IntoParStreamParams,
        init_f: InitF,
        map_f: MapF
    ) -> TryParMap<T, Self::Error>
    where
        T: 'static + Send,
        B: 'static + Send + Clone,
        InitF: FnMut() -> B,
        MapF: 'static + FnMut(B, Self::Ok) -> Fut + Send,
        Fut: 'static + Future<Output = Result<T, Self::Error>> + Send,
        Self: 'static + TryStreamExt + Sized + Unpin + Send,
        Self::Ok: Send,
        Self::Error: Send
, { ... }
fn try_par_then_unordered<T, F, Fut>(
        self,
        config: impl IntoParStreamParams,
        f: F
    ) -> TryParMapUnordered<T, Self::Error>
    where
        T: 'static + Send,
        F: 'static + FnMut(Self::Ok) -> Fut + Send,
        Fut: 'static + Future<Output = Result<T, Self::Error>> + Send,
        Self: 'static + TryStreamExt + Sized + Unpin + Send,
        Self::Ok: Send,
        Self::Error: Send
, { ... }
fn try_par_then_init_unordered<T, B, InitF, MapF, Fut>(
        self,
        config: impl IntoParStreamParams,
        init_f: InitF,
        map_f: MapF
    ) -> TryParMapUnordered<T, Self::Error>
    where
        T: 'static + Send,
        B: 'static + Send + Clone,
        InitF: FnMut() -> B,
        MapF: 'static + FnMut(B, Self::Ok) -> Fut + Send,
        Fut: 'static + Future<Output = Result<T, Self::Error>> + Send,
        Self: 'static + TryStreamExt + Sized + Unpin + Send,
        Self::Ok: Send,
        Self::Error: Send
, { ... }
fn try_par_map<T, F, Func>(
        self,
        config: impl IntoParStreamParams,
        f: F
    ) -> TryParMap<T, Self::Error>
    where
        T: 'static + Send,
        F: 'static + FnMut(Self::Ok) -> Func + Send,
        Func: 'static + FnOnce() -> Result<T, Self::Error> + Send,
        Self: 'static + TryStreamExt + Sized + Unpin + Send,
        Self::Ok: Send,
        Self::Error: Send
, { ... }
fn try_par_map_init<T, B, InitF, MapF, Func>(
        self,
        config: impl IntoParStreamParams,
        init_f: InitF,
        map_f: MapF
    ) -> TryParMap<T, Self::Error>
    where
        T: 'static + Send,
        B: 'static + Send + Clone,
        InitF: FnMut() -> B,
        MapF: 'static + FnMut(B, Self::Ok) -> Func + Send,
        Func: 'static + FnOnce() -> Result<T, Self::Error> + Send,
        Self: 'static + TryStreamExt + Sized + Unpin + Send,
        Self::Ok: Send,
        Self::Error: Send
, { ... }
fn try_par_map_unordered<T, F, Func>(
        self,
        config: impl IntoParStreamParams,
        f: F
    ) -> TryParMapUnordered<T, Self::Error>
    where
        T: 'static + Send,
        F: 'static + FnMut(Self::Ok) -> Func + Send,
        Func: 'static + FnOnce() -> Result<T, Self::Error> + Send,
        Self: 'static + TryStreamExt + Sized + Unpin + Send,
        Self::Ok: Send,
        Self::Error: Send
, { ... }
fn try_par_map_init_unordered<T, B, InitF, MapF, Func>(
        self,
        config: impl IntoParStreamParams,
        init_f: InitF,
        map_f: MapF
    ) -> TryParMapUnordered<T, Self::Error>
    where
        T: 'static + Send,
        B: 'static + Send + Clone,
        InitF: FnMut() -> B,
        MapF: 'static + FnMut(B, Self::Ok) -> Func + Send,
        Func: 'static + FnOnce() -> Result<T, Self::Error> + Send,
        Self: 'static + TryStreamExt + Sized + Unpin + Send,
        Self::Ok: Send,
        Self::Error: Send
, { ... }
fn try_par_for_each<F, Fut>(
        self,
        config: impl IntoParStreamParams,
        f: F
    ) -> TryParForEach<Self::Error>
Notable traits for TryParForEach<E>
impl<E> Future for TryParForEach<E> type Output = Result<(), E>;

    where
        F: 'static + FnMut(Self::Ok) -> Fut + Send,
        Fut: 'static + Future<Output = Result<(), Self::Error>> + Send,
        Self: 'static + TryStreamExt + Sized + Unpin + Send,
        Self::Ok: Send,
        Self::Error: Send
, { ... }
fn try_par_for_each_init<B, InitF, MapF, Fut>(
        self,
        config: impl IntoParStreamParams,
        init_f: InitF,
        map_f: MapF
    ) -> TryParForEach<Self::Error>
Notable traits for TryParForEach<E>
impl<E> Future for TryParForEach<E> type Output = Result<(), E>;

    where
        Self: 'static + TryStreamExt + Sized + Unpin + Send,
        Self::Ok: Send,
        Self::Error: Send,
        B: 'static + Send + Clone,
        InitF: FnMut() -> B,
        MapF: 'static + FnMut(B, Self::Ok) -> Fut + Send,
        Fut: 'static + Future<Output = Result<(), Self::Error>> + Send
, { ... }
fn try_par_for_each_blocking<F, Func>(
        self,
        config: impl IntoParStreamParams,
        f: F
    ) -> TryParForEach<Self::Error>
Notable traits for TryParForEach<E>
impl<E> Future for TryParForEach<E> type Output = Result<(), E>;

    where
        Self: 'static + TryStreamExt + Sized + Unpin + Send,
        Self::Ok: Send,
        Self::Error: Send,
        F: 'static + FnMut(Self::Ok) -> Func + Send,
        Func: 'static + FnOnce() -> Result<(), Self::Error> + Send
, { ... }
fn try_par_for_each_blocking_init<B, InitF, MapF, Func>(
        self,
        config: impl IntoParStreamParams,
        init_f: InitF,
        f: MapF
    ) -> TryParForEach<Self::Error>
Notable traits for TryParForEach<E>
impl<E> Future for TryParForEach<E> type Output = Result<(), E>;

    where
        Self: 'static + TryStreamExt + Sized + Unpin + Send,
        Self::Ok: Send,
        Self::Error: Send,
        B: 'static + Send + Clone,
        InitF: FnMut() -> B,
        MapF: 'static + FnMut(B, Self::Ok) -> Func + Send,
        Func: 'static + FnOnce() -> Result<(), Self::Error> + Send
, { ... }
}
Expand description

An extension trait for streams providing fallible combinators for parallel processing.

Provided methods

A fallible analogue to tee that stops sending items when receiving an error.

Create a fallible stream that gives the current iteration count.

The count wraps to zero if the count overflows.

Creates a fallible stream that reorders the items according to the iteration count.

It is usually combined with try_wrapping_enumerate.

Fallible parallel stream.

Fallible parallel stream with in-local thread initializer.

An parallel stream analogous to try_par_then_unordered with in-local thread initializer

Fallible parallel stream that runs blocking workers.

Fallible parallel stream that runs blocking workers with in-local thread initializer.

A parallel stream that analogous to try_par_map without respecting the order of input items.

A parallel stream that analogous to try_par_map_unordered with in-local thread initializer.

Runs this stream to completion, executing asynchronous closure for each element on the stream in parallel.

Runs an fallible blocking task on each element of an stream in parallel.

Creates a fallible parallel stream analogous to try_par_for_each_blocking with a in-local thread initializer.

Implementors