pub trait ExactSizeConcurrentIter: ConcurrentIter {
// Required methods
fn len(&self) -> usize;
fn next_exact_chunk(
&self,
chunk_size: usize
) -> Option<NextManyExact<Self::Item, impl ExactSizeIterator<Item = Self::Item>>>;
// Provided method
fn is_empty(&self) -> bool { ... }
}Expand description
A concurrent iterator that knows its exact length.
Required Methods§
sourcefn next_exact_chunk(
&self,
chunk_size: usize
) -> Option<NextManyExact<Self::Item, impl ExactSizeIterator<Item = Self::Item>>>
fn next_exact_chunk( &self, chunk_size: usize ) -> Option<NextManyExact<Self::Item, impl ExactSizeIterator<Item = Self::Item>>>
Returns the next chunk with the requested chunk_size:
- Returns
Noneif there are no more elements to yield. - Returns
Someof acrate::NextManyExactwhich contains the following information:begin_idx: the index of the first element to be yielded by thevaluesiterator.values: anExactSizeIteratorwith knownlenwhich is guaranteed to be positive and less than or equal tochunk_size.
Provided Methods§
Object Safety§
This trait is not object safe.