pub struct AsyncParallelAdapter<I> { /* private fields */ }Expand description
Adapter to make async iterators work with parallel processing
Trait Implementations§
Source§impl<I: AsyncIterator> AsyncIterator for AsyncParallelAdapter<I>
impl<I: AsyncIterator> AsyncIterator for AsyncParallelAdapter<I>
Source§type Item = <I as AsyncIterator>::Item
type Item = <I as AsyncIterator>::Item
The type of items yielded by this async iterator
Source§fn map<F, Fut, R>(self, map_fn: F) -> AsyncMap<Self, F>
fn map<F, Fut, R>(self, map_fn: F) -> AsyncMap<Self, F>
Async map operation that transforms each element
Source§fn filter<F, Fut>(self, filter_fn: F) -> AsyncFilter<Self, F>
fn filter<F, Fut>(self, filter_fn: F) -> AsyncFilter<Self, F>
Async filter operation
Source§fn take(self, count: usize) -> AsyncTake<Self>where
Self: Sized,
fn take(self, count: usize) -> AsyncTake<Self>where
Self: Sized,
Retain at most
count items from the logical async stream prefix.Source§fn skip(self, count: usize) -> AsyncSkip<Self>where
Self: Sized,
fn skip(self, count: usize) -> AsyncSkip<Self>where
Self: Sized,
Discard
count items from the logical async stream prefix.Source§fn enumerate(self) -> AsyncEnumerate<Self>where
Self: Sized,
fn enumerate(self) -> AsyncEnumerate<Self>where
Self: Sized,
Pair each item with its zero-based logical stream position.
Source§fn zip<J>(self, other: J) -> AsyncZip<Self, J>where
Self: Sized,
J: AsyncIterator,
fn zip<J>(self, other: J) -> AsyncZip<Self, J>where
Self: Sized,
J: AsyncIterator,
Pair items with another async iterator, stopping at the shorter input.
Source§fn for_each<F, Fut>(self, func: F) -> AsyncForEach<Self, F> ⓘ
fn for_each<F, Fut>(self, func: F) -> AsyncForEach<Self, F> ⓘ
Async for_each operation with side effects
Source§fn collect<C>(self) -> AsyncCollect<Self, C> ⓘ
fn collect<C>(self) -> AsyncCollect<Self, C> ⓘ
Collect into a vector asynchronously
Source§fn fold<T, F, Fut>(self, init: T, fold_fn: F) -> AsyncFold<Self, T, F> ⓘ
fn fold<T, F, Fut>(self, init: T, fold_fn: F) -> AsyncFold<Self, T, F> ⓘ
Fold operation with async function
Source§fn reduce<F, Fut>(self, reduce_fn: F) -> AsyncReduce<Self, F> ⓘ
fn reduce<F, Fut>(self, reduce_fn: F) -> AsyncReduce<Self, F> ⓘ
Reduce operation for async iterators
Source§fn into_parallel(self) -> AsyncParallelAdapter<Self>where
Self: Sized,
fn into_parallel(self) -> AsyncParallelAdapter<Self>where
Self: Sized,
Convert to parallel iterator for hybrid processing
Source§impl<I: AsyncIterator> AsyncParallelIterator for AsyncParallelAdapter<I>
impl<I: AsyncIterator> AsyncParallelIterator for AsyncParallelAdapter<I>
Source§fn par_map<F, Fut, R>(
self,
concurrency: usize,
map_fn: F,
) -> ParAsyncMap<Self, F>
fn par_map<F, Fut, R>( self, concurrency: usize, map_fn: F, ) -> ParAsyncMap<Self, F>
Execute async operations in parallel with controlled concurrency
Source§fn par_filter<F, Fut>(
self,
concurrency: usize,
filter_fn: F,
) -> ParAsyncFilter<Self, F>
fn par_filter<F, Fut>( self, concurrency: usize, filter_fn: F, ) -> ParAsyncFilter<Self, F>
Parallel async filter with concurrency control
Auto Trait Implementations§
impl<I> Freeze for AsyncParallelAdapter<I>where
I: Freeze,
impl<I> RefUnwindSafe for AsyncParallelAdapter<I>where
I: RefUnwindSafe,
impl<I> Send for AsyncParallelAdapter<I>where
I: Send,
impl<I> Sync for AsyncParallelAdapter<I>where
I: Sync,
impl<I> Unpin for AsyncParallelAdapter<I>where
I: Unpin,
impl<I> UnsafeUnpin for AsyncParallelAdapter<I>where
I: UnsafeUnpin,
impl<I> UnwindSafe for AsyncParallelAdapter<I>where
I: UnwindSafe,
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