Trait par_stream::prelude::FallibleParStreamExt[][src]

pub trait FallibleParStreamExt where
    Self: 'static + Send + TryStream + FallibleIndexedStreamExt
{
Show 17 methods fn try_then_spawned<T, U, E, F, Fut>(
        self,
        buf_size: impl Into<Option<usize>>,
        f: F
    ) -> TryThenSpawned<U, E>
    where
        Self: Stream<Item = Result<T, E>>,
        T: 'static + Send,
        U: 'static + Send,
        E: 'static + Send,
        F: 'static + FnMut(T) -> Fut + Send,
        Fut: Future<Output = Result<U, E>> + Send
;
fn try_map_spawned<T, U, E, F>(
        self,
        buf_size: impl Into<Option<usize>>,
        f: F
    ) -> TryMapSpawned<U, E>
    where
        Self: Stream<Item = Result<T, E>>,
        T: 'static + Send,
        U: 'static + Send,
        E: 'static + Send,
        F: 'static + FnMut(T) -> Result<U, E> + Send
;
fn try_batching<T, U, E, F, Fut>(self, f: F) -> TryBatching<U, E>
    where
        Self: Stream<Item = Result<T, E>>,
        T: 'static + Send,
        U: 'static + Send,
        E: 'static + Send,
        Self: Stream<Item = Result<T, E>>,
        F: FnOnce(BatchingReceiver<T>, BatchingSender<U>) -> Fut,
        Fut: 'static + Future<Output = Result<(), E>> + Send
;
fn try_par_batching_unordered<T, U, E, P, F, Fut>(
        self,
        config: P,
        f: F
    ) -> TryParBatchingUnordered<U, E>
    where
        Self: Stream<Item = Result<T, E>>,
        F: FnMut(usize, Receiver<T>, Sender<U>) -> Fut,
        Fut: 'static + Future<Output = Result<(), E>> + Send,
        T: 'static + Send,
        U: 'static + Send,
        E: 'static + Send,
        P: IntoParStreamParams
;
fn try_tee<T, E>(self, buf_size: impl Into<Option<usize>>) -> TryTee<T, E>
    where
        Self: Stream<Item = Result<T, E>>,
        T: 'static + Send + Clone,
        E: 'static + Send + Clone
;
fn try_par_then<P, T, U, E, F, Fut>(
        self,
        config: P,
        f: F
    ) -> TryParThen<U, E>
    where
        Self: Stream<Item = Result<T, E>>,
        P: IntoParStreamParams,
        T: 'static + Send,
        U: 'static + Send,
        E: 'static + Send,
        F: 'static + FnMut(T) -> Fut + Send,
        Fut: 'static + Future<Output = Result<U, E>> + Send
;
fn try_par_then_init<P, T, U, E, B, InitF, ThenF, Fut>(
        self,
        config: P,
        init_f: InitF,
        map_f: ThenF
    ) -> TryParThen<U, E>
    where
        Self: Stream<Item = Result<T, E>>,
        P: IntoParStreamParams,
        T: 'static + Send,
        U: 'static + Send,
        E: 'static + Send,
        B: 'static + Send + Clone,
        InitF: FnMut() -> B,
        ThenF: 'static + FnMut(B, T) -> Fut + Send,
        Fut: 'static + Future<Output = Result<U, E>> + Send
;
fn try_par_then_unordered<P, T, U, E, F, Fut>(
        self,
        config: P,
        f: F
    ) -> TryParThenUnordered<U, E>
    where
        Self: Stream<Item = Result<T, E>>,
        U: 'static + Send,
        T: 'static + Send,
        E: 'static + Send,
        F: 'static + FnMut(T) -> Fut + Send,
        Fut: 'static + Future<Output = Result<U, E>> + Send,
        P: IntoParStreamParams
;
fn try_par_then_init_unordered<P, T, U, E, B, InitF, ThenF, Fut>(
        self,
        config: P,
        init_f: InitF,
        map_f: ThenF
    ) -> TryParThenUnordered<U, E>
    where
        Self: Stream<Item = Result<T, E>>,
        P: IntoParStreamParams,
        T: 'static + Send,
        U: 'static + Send,
        E: 'static + Send,
        B: 'static + Send + Clone,
        InitF: FnMut() -> B,
        ThenF: 'static + FnMut(B, T) -> Fut + Send,
        Fut: 'static + Future<Output = Result<U, E>> + Send
;
fn try_par_map<P, T, U, E, F, Func>(
        self,
        config: P,
        f: F
    ) -> TryParMap<U, E>
    where
        Self: Stream<Item = Result<T, E>>,
        P: IntoParStreamParams,
        T: 'static + Send,
        U: 'static + Send,
        E: 'static + Send,
        F: 'static + FnMut(T) -> Func + Send,
        Func: 'static + FnOnce() -> Result<U, E> + Send
;
fn try_par_map_init<P, T, U, E, B, InitF, MapF, Func>(
        self,
        config: P,
        init_f: InitF,
        map_f: MapF
    ) -> TryParMap<U, E>
    where
        Self: Stream<Item = Result<T, E>>,
        P: IntoParStreamParams,
        T: 'static + Send,
        U: 'static + Send,
        E: 'static + Send,
        B: 'static + Send + Clone,
        InitF: FnMut() -> B,
        MapF: 'static + FnMut(B, T) -> Func + Send,
        Func: 'static + FnOnce() -> Result<U, E> + Send
;
fn try_par_map_unordered<P, T, U, E, F, Func>(
        self,
        config: P,
        f: F
    ) -> TryParMapUnordered<U, E>
    where
        Self: Stream<Item = Result<T, E>>,
        P: IntoParStreamParams,
        T: 'static + Send,
        U: 'static + Send,
        E: 'static + Send,
        F: 'static + FnMut(T) -> Func + Send,
        Func: 'static + FnOnce() -> Result<U, E> + Send
;
fn try_par_map_init_unordered<P, T, U, E, B, InitF, MapF, Func>(
        self,
        config: P,
        init_f: InitF,
        map_f: MapF
    ) -> TryParMapUnordered<U, E>
    where
        Self: Stream<Item = Result<T, E>>,
        P: IntoParStreamParams,
        T: 'static + Send,
        U: 'static + Send,
        E: 'static + Send,
        B: 'static + Send + Clone,
        InitF: FnMut() -> B,
        MapF: 'static + FnMut(B, T) -> Func + Send,
        Func: 'static + FnOnce() -> Result<U, E> + Send
;
fn try_par_for_each<P, T, E, F, Fut>(
        self,
        config: P,
        f: F
    ) -> TryParForEach<E>
Notable traits for TryParForEach<E>
impl<E> Future for TryParForEach<E> type Output = Result<(), E>;

    where
        Self: Stream<Item = Result<T, E>>,
        P: IntoParStreamParams,
        T: 'static + Send,
        E: 'static + Send,
        F: 'static + FnMut(T) -> Fut + Send,
        Fut: 'static + Future<Output = Result<(), E>> + Send
;
fn try_par_for_each_init<P, T, E, B, InitF, MapF, Fut>(
        self,
        config: P,
        init_f: InitF,
        map_f: MapF
    ) -> TryParForEach<E>
Notable traits for TryParForEach<E>
impl<E> Future for TryParForEach<E> type Output = Result<(), E>;

    where
        Self: Stream<Item = Result<T, E>>,
        P: IntoParStreamParams,
        T: 'static + Send,
        E: 'static + Send,
        B: 'static + Send + Clone,
        InitF: FnMut() -> B,
        MapF: 'static + FnMut(B, T) -> Fut + Send,
        Fut: 'static + Future<Output = Result<(), E>> + Send
;
fn try_par_for_each_blocking<P, T, E, F, Func>(
        self,
        config: P,
        f: F
    ) -> TryParForEachBlocking<E>
Notable traits for TryParForEachBlocking<E>
impl<E> Future for TryParForEachBlocking<E> type Output = Result<(), E>;

    where
        Self: Stream<Item = Result<T, E>>,
        P: IntoParStreamParams,
        T: 'static + Send,
        E: 'static + Send,
        F: 'static + FnMut(T) -> Func + Send,
        Func: 'static + FnOnce() -> Result<(), E> + Send
;
fn try_par_for_each_blocking_init<P, T, E, B, InitF, MapF, Func>(
        self,
        config: P,
        init_f: InitF,
        f: MapF
    ) -> TryParForEachBlocking<E>
Notable traits for TryParForEachBlocking<E>
impl<E> Future for TryParForEachBlocking<E> type Output = Result<(), E>;

    where
        Self: Stream<Item = Result<T, E>>,
        P: IntoParStreamParams,
        T: 'static + Send,
        E: 'static + Send,
        B: 'static + Send + Clone,
        InitF: FnMut() -> B,
        MapF: 'static + FnMut(B, T) -> Func + Send,
        Func: 'static + FnOnce() -> Result<(), E> + Send
;
}
Expand description

An extension trait that provides fallible combinators for parallel processing on streams.

Required methods

A fallible analogue to then_spawned.

A fallible analogue to map_spawned.

A fallible analogue to batching that consumes as many elements as it likes for each next output element.

A fallible analogue to par_batching_unordered.

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

A fallible analogue to par_then.

A fallible analogue to par_then_init.

A fallible analogue to par_then_unordered.

A fallible analogue to par_then_init_unordered.

A fallible analogue to par_map.

A fallible analogue to par_map_init.

A fallible analogue to par_map_unordered.

A fallible analogue to par_map_init_unordered.

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

A fallible analogue to par_for_each_init.

A fallible analogue to par_for_each_blocking.

A fallible analogue to par_for_each_blocking_init.

Implementors