pub struct ParAsyncBuilder<St, Fac>where
St: ?Sized + Stream,
St::Item: 'static + Send,
Fac: FutureFactory<St::Item>,
Fac::Fut: 'static + Send + Future,
<Fac::Fut as Future>::Output: Send,{ /* private fields */ }
Expand description
The parallel stream builder with scheduled asynchronous tasks.
Implementations§
Source§impl<St, Fac> ParAsyncBuilder<St, Fac>
impl<St, Fac> ParAsyncBuilder<St, Fac>
Sourcepub fn map_async<NewFac, NewFut>(
self,
new_fac: NewFac,
) -> ParAsyncBuilder<St, ComposeFutureFactory<St::Item, Fac, NewFac>>
pub fn map_async<NewFac, NewFut>( self, new_fac: NewFac, ) -> ParAsyncBuilder<St, ComposeFutureFactory<St::Item, Fac, NewFac>>
Schedule an asynchronous task.
Sourcepub fn map_blocking<NewOut, NewFac, NewFunc>(
self,
new_fac: NewFac,
) -> ParAsyncTailBlockBuilder<St, Fac, NewFac, NewOut>
pub fn map_blocking<NewOut, NewFac, NewFunc>( self, new_fac: NewFac, ) -> ParAsyncTailBlockBuilder<St, Fac, NewFac, NewOut>
Schedules a blocking task.
The worker thread will pass the blocking task to a blocking thread and wait for the task to finish. It will introduce overhead on spawning blocking threads.
Sourcepub fn build_unordered_stream<P>(
self,
params: P,
) -> UnorderedStream<<Fac::Fut as Future>::Output>
pub fn build_unordered_stream<P>( self, params: P, ) -> UnorderedStream<<Fac::Fut as Future>::Output>
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<<Fac::Fut as Future>::Output>
pub fn build_ordered_stream<P>( self, params: P, ) -> OrderedStream<<Fac::Fut as Future>::Output>
Creates a stream that runs scheduled parallel tasks, which output respects the input order.
Source§impl<St, Fac> ParAsyncBuilder<St, Fac>
impl<St, Fac> ParAsyncBuilder<St, Fac>
Source§impl<St, Fac, Error> ParAsyncBuilder<St, Fac>
impl<St, Fac, Error> ParAsyncBuilder<St, Fac>
Auto Trait Implementations§
impl<St, Fac> Freeze for ParAsyncBuilder<St, Fac>
impl<St, Fac> RefUnwindSafe for ParAsyncBuilder<St, Fac>
impl<St, Fac> Send for ParAsyncBuilder<St, Fac>
impl<St, Fac> Sync for ParAsyncBuilder<St, Fac>
impl<St, Fac> Unpin for ParAsyncBuilder<St, Fac>
impl<St, Fac> UnwindSafe for ParAsyncBuilder<St, Fac>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more