pub struct Copied<'a, T, C>{ /* private fields */ }
Expand description
An concurrent iterator, backed with an atomic iterator, that copies the elements of an underlying iterator.
This struct
is created by the copied
method on the concurrent iterator.
Trait Implementations§
Source§impl<'a, T, C> ConcurrentIter for Copied<'a, T, C>
impl<'a, T, C> ConcurrentIter for Copied<'a, T, C>
Source§type BufferedIter = CopiedBufferedChunk<'a, T, <C as ConcurrentIter>::BufferedIter>
type BufferedIter = CopiedBufferedChunk<'a, T, <C as ConcurrentIter>::BufferedIter>
Type of the buffered iterator returned by the
chunk_iter
method when elements are fetched in chunks by each thread.Source§fn next_id_and_value(&self) -> Option<Next<Self::Item>>
fn next_id_and_value(&self) -> Option<Next<Self::Item>>
Advances the iterator and returns the next value together with its enumeration index. Read more
Source§fn next_chunk(
&self,
chunk_size: usize,
) -> Option<NextChunk<Self::Item, impl ExactSizeIterator<Item = Self::Item>>>
fn next_chunk( &self, chunk_size: usize, ) -> Option<NextChunk<Self::Item, impl ExactSizeIterator<Item = Self::Item>>>
Advances the iterator
chunk_size
times and returns an iterator of at most chunk_size
consecutive next values.
Further, the beginning enumeration index of the yielded values is returned. Read moreSource§fn into_con_iter_x(self) -> impl ConcurrentIterX<Item = Self::Item>where
Self: Sized,
fn into_con_iter_x(self) -> impl ConcurrentIterX<Item = Self::Item>where
Self: Sized,
Source§fn ids_and_values(&self) -> ConIterIdsAndValues<'_, Self> ⓘwhere
Self: Sized,
fn ids_and_values(&self) -> ConIterIdsAndValues<'_, Self> ⓘwhere
Self: Sized,
Returns an
Iterator
over the ids and values of elements of the concurrent iterator. Read moreSource§fn for_each<Fun: FnMut(Self::Item)>(&self, chunk_size: usize, fun: Fun)where
Self: Sized,
fn for_each<Fun: FnMut(Self::Item)>(&self, chunk_size: usize, fun: Fun)where
Self: Sized,
Applies the function
fun
to each element of the iterator concurrently. Read moreSource§fn enumerate_for_each<Fun: FnMut(usize, Self::Item)>(
&self,
chunk_size: usize,
fun: Fun,
)where
Self: Sized,
fn enumerate_for_each<Fun: FnMut(usize, Self::Item)>(
&self,
chunk_size: usize,
fun: Fun,
)where
Self: Sized,
Applies the function
fun
to each index and corresponding element of the iterator concurrently. Read moreSource§fn buffered_iter(
&self,
chunk_size: usize,
) -> BufferedIter<'_, Self::Item, Self::BufferedIter>
fn buffered_iter( &self, chunk_size: usize, ) -> BufferedIter<'_, Self::Item, Self::BufferedIter>
Creates an iterator which pulls elements from this iterator as chunks of the given
chunk_size
. Read moreSource§impl<'a, T, C> ConcurrentIterX for Copied<'a, T, C>
impl<'a, T, C> ConcurrentIterX for Copied<'a, T, C>
Source§type SeqIter = Copied<<C as ConcurrentIterX>::SeqIter>
type SeqIter = Copied<<C as ConcurrentIterX>::SeqIter>
Inner type which is the source of the data to be iterated, which in addition is a regular sequential
Iterator
.Source§type BufferedIterX = CopiedBufferedChunk<'a, T, <C as ConcurrentIterX>::BufferedIterX>
type BufferedIterX = CopiedBufferedChunk<'a, T, <C as ConcurrentIterX>::BufferedIterX>
Type of the buffered iterator returned by the
buffered_iter_x
method when elements are fetched in chunks by each thread.Source§fn into_seq_iter(self) -> Self::SeqIter
fn into_seq_iter(self) -> Self::SeqIter
Converts the concurrent iterator back to the original wrapped type which is the source of the elements to be iterated.
Already progressed elements are skipped.
Source§fn next_chunk_x(
&self,
chunk_size: usize,
) -> Option<impl ExactSizeIterator<Item = Self::Item>>
fn next_chunk_x( &self, chunk_size: usize, ) -> Option<impl ExactSizeIterator<Item = Self::Item>>
Advances the iterator
chunk_size
times and returns an iterator of at most chunk_size
consecutive next values. Read moreSource§fn next(&self) -> Option<Self::Item>
fn next(&self) -> Option<Self::Item>
Advances the iterator and returns the next value. Read more
Source§fn skip_to_end(&self)
fn skip_to_end(&self)
Skips all remaining elements of the iterator and assumes that the end of the iterator is reached. Read more
Source§fn try_get_len(&self) -> Option<usize>
fn try_get_len(&self) -> Option<usize>
Returns Some of the remaining length of the iterator if it is known; returns None otherwise.
Source§fn try_get_initial_len(&self) -> Option<usize>
fn try_get_initial_len(&self) -> Option<usize>
Returns Some of the initial length of the iterator when it was constructed if it is known; returns None otherwise. Read more
Source§fn values(&self) -> ConIterValuesX<'_, Self>where
Self: Sized,
fn values(&self) -> ConIterValuesX<'_, Self>where
Self: Sized,
Returns an
Iterator
over the values of elements of the concurrent iterator. Read moreSource§fn for_each_x<Fun: FnMut(Self::Item)>(&self, chunk_size: usize, fun: Fun)where
Self: Sized,
fn for_each_x<Fun: FnMut(Self::Item)>(&self, chunk_size: usize, fun: Fun)where
Self: Sized,
Applies the function
fun
to each element of the iterator concurrently. Read moreSource§fn fold<B, Fold>(&self, chunk_size: usize, neutral: B, fold: Fold) -> B
fn fold<B, Fold>(&self, chunk_size: usize, neutral: B, fold: Fold) -> B
Folds the elements of the iterator pulled concurrently using
fold
function. Read moreSource§fn has_more(&self) -> HasMore
fn has_more(&self) -> HasMore
Returns whether or not the concurrent iterator has more elements to yield. Read more
Source§fn buffered_iter_x(
&self,
chunk_size: usize,
) -> BufferedIter<'_, Self::Item, Self::BufferedIterX>
fn buffered_iter_x( &self, chunk_size: usize, ) -> BufferedIter<'_, Self::Item, Self::BufferedIterX>
Creates an iterator which pulls elements from this iterator as chunks of the given
chunk_size
. Read moreimpl<T, C> Send for Copied<'_, T, C>
impl<T, C> Sync for Copied<'_, T, C>
Auto Trait Implementations§
impl<'a, T, C> Freeze for Copied<'a, T, C>where
C: Freeze,
impl<'a, T, C> RefUnwindSafe for Copied<'a, T, C>where
C: RefUnwindSafe,
T: RefUnwindSafe,
impl<'a, T, C> Unpin for Copied<'a, T, C>where
C: Unpin,
impl<'a, T, C> UnwindSafe for Copied<'a, T, C>where
C: UnwindSafe,
T: RefUnwindSafe,
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