Struct par_stream::builder::ParAsyncTailBlockBuilder
source · [−]pub struct ParAsyncTailBlockBuilder<St, FutFac, FnFac, Out> where
St: ?Sized + Stream,
St::Item: 'static + Send,
FutFac: FutureFactory<St::Item>,
FutFac::Fut: 'static + Send + Future,
<FutFac::Fut as Future>::Output: Send,
FnFac: FnFactory<<FutFac::Fut as Future>::Output, Out>,
FnFac::Fn: 'static + Send + FnOnce() -> Out,
Out: 'static + Send, { /* private fields */ }
Expand description
The parallel stream builder with scheduled asynchronous tasks and a blocking task in the end.
Implementations
sourceimpl<St, FutFac, FnFac, Out> ParAsyncTailBlockBuilder<St, FutFac, FnFac, Out> where
St: Stream,
St::Item: 'static + Send,
FutFac: 'static + Send + FutureFactory<St::Item>,
FutFac::Fut: 'static + Send + Future,
<FutFac::Fut as Future>::Output: 'static + Send,
FnFac: 'static + Send + Clone + FnFactory<<FutFac::Fut as Future>::Output, Out>,
FnFac::Fn: 'static + Send + FnOnce() -> Out,
Out: 'static + Send,
impl<St, FutFac, FnFac, Out> ParAsyncTailBlockBuilder<St, FutFac, FnFac, Out> where
St: Stream,
St::Item: 'static + Send,
FutFac: 'static + Send + FutureFactory<St::Item>,
FutFac::Fut: 'static + Send + Future,
<FutFac::Fut as Future>::Output: 'static + Send,
FnFac: 'static + Send + Clone + FnFactory<<FutFac::Fut as Future>::Output, Out>,
FnFac::Fn: 'static + Send + FnOnce() -> Out,
Out: 'static + Send,
sourcepub fn map_async<NewFac, NewFut>(
self,
new_fac: NewFac
) -> ParAsyncBuilder<St, BoxFutureFactory<'static, St::Item, NewFut::Output>> where
NewFac: 'static + Send + Clone + FnMut(Out) -> NewFut,
NewFut: 'static + Send + Future,
NewFut::Output: 'static + Send,
pub fn map_async<NewFac, NewFut>(
self,
new_fac: NewFac
) -> ParAsyncBuilder<St, BoxFutureFactory<'static, St::Item, NewFut::Output>> where
NewFac: 'static + Send + Clone + FnMut(Out) -> NewFut,
NewFut: 'static + Send + Future,
NewFut::Output: 'static + Send,
Schedule an asynchronous task.
sourcepub fn map_blocking<NewOut, NewFac, NewFunc>(
self,
new_fac: NewFac
) -> ParAsyncTailBlockBuilder<St, FutFac, BoxFnFactory<<FutFac::Fut as Future>::Output, NewOut>, NewOut> where
NewFac: 'static + Send + Clone + FnMut(Out) -> NewFunc,
NewFunc: 'static + Send + FnOnce() -> NewOut,
NewFunc::Output: 'static + Send,
pub fn map_blocking<NewOut, NewFac, NewFunc>(
self,
new_fac: NewFac
) -> ParAsyncTailBlockBuilder<St, FutFac, BoxFnFactory<<FutFac::Fut as Future>::Output, NewOut>, NewOut> where
NewFac: 'static + Send + Clone + FnMut(Out) -> NewFunc,
NewFunc: 'static + Send + FnOnce() -> NewOut,
NewFunc::Output: 'static + Send,
Schedule a blocking task.
sourcepub fn build_unordered_stream<P>(self, params: P) -> UnorderedStream<Out> where
St: 'static + Send,
P: Into<ParParams>,
pub fn build_unordered_stream<P>(self, params: P) -> UnorderedStream<Out> where
St: 'static + Send,
P: Into<ParParams>,
Creates a stream that runs scheduled parallel tasks, which output does not respect the input order.
sourcepub fn build_ordered_stream<P>(self, params: P) -> OrderedStream<Out> where
St: 'static + Send,
P: Into<ParParams>,
pub fn build_ordered_stream<P>(self, params: P) -> OrderedStream<Out> where
St: 'static + Send,
P: Into<ParParams>,
Creates a stream that runs scheduled parallel tasks, which output respects the input order.
sourceimpl<St, FutFac, FnFac> ParAsyncTailBlockBuilder<St, FutFac, FnFac, ()> where
St: 'static + Send + Stream,
St::Item: 'static + Send,
FutFac: 'static + Send + FutureFactory<St::Item>,
FutFac::Fut: 'static + Send + Future,
<FutFac::Fut as Future>::Output: 'static + Send,
FnFac: 'static + Send + Clone + FnFactory<<FutFac::Fut as Future>::Output, ()>,
FnFac::Fn: 'static + Send + FnOnce(),
impl<St, FutFac, FnFac> ParAsyncTailBlockBuilder<St, FutFac, FnFac, ()> where
St: 'static + Send + Stream,
St::Item: 'static + Send,
FutFac: 'static + Send + FutureFactory<St::Item>,
FutFac::Fut: 'static + Send + Future,
<FutFac::Fut as Future>::Output: 'static + Send,
FnFac: 'static + Send + Clone + FnFactory<<FutFac::Fut as Future>::Output, ()>,
FnFac::Fn: 'static + Send + FnOnce(),
Auto Trait Implementations
impl<St: ?Sized, FutFac, FnFac, Out> RefUnwindSafe for ParAsyncTailBlockBuilder<St, FutFac, FnFac, Out> where
FnFac: RefUnwindSafe,
FutFac: RefUnwindSafe,
Out: RefUnwindSafe,
St: RefUnwindSafe,
impl<St: ?Sized, FutFac, FnFac, Out> Send for ParAsyncTailBlockBuilder<St, FutFac, FnFac, Out> where
FnFac: Send,
FutFac: Send,
St: Send,
impl<St: ?Sized, FutFac, FnFac, Out> Sync for ParAsyncTailBlockBuilder<St, FutFac, FnFac, Out> where
FnFac: Sync,
FutFac: Sync,
Out: Sync,
St: Sync,
impl<St: ?Sized, FutFac, FnFac, Out> Unpin for ParAsyncTailBlockBuilder<St, FutFac, FnFac, Out> where
FnFac: Unpin,
FutFac: Unpin,
Out: Unpin,
St: Unpin,
impl<St: ?Sized, FutFac, FnFac, Out> UnwindSafe for ParAsyncTailBlockBuilder<St, FutFac, FnFac, Out> where
FnFac: UnwindSafe,
FutFac: UnwindSafe,
Out: UnwindSafe,
St: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more