Trait par_stream::prelude::TryParStreamExt [−][src]
An extension trait for TryStream that provides parallel combinator functions.
Provided methods
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,
[src]
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,
Fallible parallel stream.
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,
[src]
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,
Fallible parallel stream with in-local thread initializer.
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,
[src]
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,
Fallible parallel stream that does not respect the ordering of input items.
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,
[src]
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,
An parallel stream analogous to try_par_then_unordered with in-local thread initializer
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,
[src]
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,
Fallible parallel stream that runs blocking workers.
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,
[src]
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,
Fallible parallel stream that runs blocking workers with in-local thread initializer.
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,
[src]
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,
A parallel stream that analogous to try_par_map without respecting the order of input items.
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,
[src]
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,
A parallel stream that analogous to try_par_map_unordered with in-local thread initializer.
fn try_wrapping_enumerate<T, E>(self) -> TryWrappingEnumerate<T, E, Self> where
Self: Stream<Item = Result<T, E>> + Sized + Unpin + Send,
[src]
Self: Stream<Item = Result<T, E>> + Sized + Unpin + Send,
Create a fallible stream that gives the current iteration count.
The count wraps to zero if the count overflows.
fn try_reorder_enumerated<T, E>(self) -> TryReorderEnumerated<T, E, Self> where
Self: Stream<Item = Result<(usize, T), E>> + Sized + Unpin + Send,
[src]
Self: Stream<Item = Result<(usize, T), E>> + Sized + Unpin + Send,
Creates a fallible stream that reorders the items according to the iteration count.
It is usually combined with try_wrapping_enumerate.
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,
[src]
self,
config: impl IntoParStreamParams,
f: F
) -> TryParForEach<Self::Error>ⓘ
Notable traits for TryParForEach<E>
impl<E> Future for TryParForEach<E> type Output = Result<(), E>;
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,
Runs this stream to completion, executing asynchronous closure for each element on the stream in parallel.
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,
[src]
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>;
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,
Runs an fallible blocking task on each element of an stream in parallel.
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,
[src]
self,
config: impl IntoParStreamParams,
f: F
) -> TryParForEach<Self::Error>ⓘ
Notable traits for TryParForEach<E>
impl<E> Future for TryParForEach<E> type Output = Result<(), E>;
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,
[src]
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>;
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,
Creates a fallible parallel stream analogous to try_par_for_each_blocking with a in-local thread initializer.
Implementors
impl<S> TryParStreamExt for S where
S: TryStream,
[src]
S: TryStream,