pub struct ConIterEmpty<T> { /* private fields */ }Expand description
An empty concurrent iterator which does not yield any elements.
§Examples
use orx_concurrent_iter::*;
let con_iter = iter::empty::<String>();
assert_eq!(con_iter.next(), None);
// or
let con_iter = implementations::ConIterEmpty::<String>::new();
assert_eq!(con_iter.next(), None);Implementations§
Source§impl<T> ConIterEmpty<T>
impl<T> ConIterEmpty<T>
Sourcepub fn new() -> ConIterEmpty<T>
pub fn new() -> ConIterEmpty<T>
Creates a new empty concurrent iterator with no elements.
Trait Implementations§
Source§impl<T> Clone for ConIterEmpty<T>where
T: Clone,
impl<T> Clone for ConIterEmpty<T>where
T: Clone,
Source§fn clone(&self) -> ConIterEmpty<T>
fn clone(&self) -> ConIterEmpty<T>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<T> ConcurrentIter for ConIterEmpty<T>where
T: Send,
impl<T> ConcurrentIter for ConIterEmpty<T>where
T: Send,
Source§type SequentialIter = Empty<T>
type SequentialIter = Empty<T>
Type of the sequential iterator that the concurrent iterator can be converted
into using the
into_seq_iter method.Source§type ChunkPuller<'i> = ChunkPullerEmpty<'i, T>
where
ConIterEmpty<T>: 'i
type ChunkPuller<'i> = ChunkPullerEmpty<'i, T> where ConIterEmpty<T>: 'i
Type of the chunk puller that can be created using the
chunk_puller method.Source§fn into_seq_iter(self) -> <ConIterEmpty<T> as ConcurrentIter>::SequentialIter
fn into_seq_iter(self) -> <ConIterEmpty<T> as ConcurrentIter>::SequentialIter
Converts the concurrent iterator into its sequential regular counterpart.
Note that the sequential iterator is a regular
Iterator, and hence,
does not have any overhead related with atomic states. Therefore, it is
useful where the program decides to iterate over a single thread rather
than concurrently by multiple threads. Read moreSource§fn skip_to_end(&self)
fn skip_to_end(&self)
Immediately jumps to the end of the iterator, skipping the remaining elements. Read more
Source§fn next(&self) -> Option<<ConIterEmpty<T> as ConcurrentIter>::Item>
fn next(&self) -> Option<<ConIterEmpty<T> as ConcurrentIter>::Item>
Returns the next element of the iterator.
It returns None if there are no more elements left. Read more
Source§fn next_with_idx(
&self,
) -> Option<(usize, <ConIterEmpty<T> as ConcurrentIter>::Item)>
fn next_with_idx( &self, ) -> Option<(usize, <ConIterEmpty<T> as ConcurrentIter>::Item)>
Returns the next element of the iterator together its index.
It returns None if there are no more elements left. Read more
Source§fn size_hint(&self) -> (usize, Option<usize>)
fn size_hint(&self) -> (usize, Option<usize>)
Returns the bounds on the remaining length of the iterator. Read more
Source§fn chunk_puller(
&self,
chunk_size: usize,
) -> <ConIterEmpty<T> as ConcurrentIter>::ChunkPuller<'_>
fn chunk_puller( &self, chunk_size: usize, ) -> <ConIterEmpty<T> as ConcurrentIter>::ChunkPuller<'_>
Creates a
ChunkPuller from the concurrent iterator.
The created chunk puller can be used to pull chunk_size elements at once from the
data source, rather than pulling one by one. Read moreSource§fn try_get_len(&self) -> Option<usize>
fn try_get_len(&self) -> Option<usize>
Returns
Some(x) if the number of remaining items is known with certainly and if it
is equal to x. Read moreSource§fn item_puller(&self) -> ItemPuller<'_, Self> ⓘwhere
Self: Sized,
fn item_puller(&self) -> ItemPuller<'_, Self> ⓘwhere
Self: Sized,
Creates a
ItemPuller from the concurrent iterator.
The created item puller can be used to pull elements one by one from the
data source. Read moreSource§fn item_puller_with_idx(&self) -> EnumeratedItemPuller<'_, Self> ⓘwhere
Self: Sized,
fn item_puller_with_idx(&self) -> EnumeratedItemPuller<'_, Self> ⓘwhere
Self: Sized,
Creates a
EnumeratedItemPuller from the concurrent iterator.
The created item puller can be used to pull elements one by one from the
data source together with the index of the elements. Read moreSource§fn copied<'a, T>(self) -> ConIterCopied<'a, Self, T>
fn copied<'a, T>(self) -> ConIterCopied<'a, Self, T>
Creates an iterator which copies all of its elements. Read more
Source§fn cloned<'a, T>(self) -> ConIterCloned<'a, Self, T>
fn cloned<'a, T>(self) -> ConIterCloned<'a, Self, T>
Creates an iterator which clones all of its elements. Read more
Source§fn enumerate(self) -> Enumerate<Self>where
Self: Sized,
fn enumerate(self) -> Enumerate<Self>where
Self: Sized,
Creates an iterator which gives the current iteration count as well as the next value. Read more
Source§fn chain_inexact<C>(
self,
other: C,
) -> ChainUnknownLenI<Self, <C as IntoConcurrentIter>::IntoIter>
fn chain_inexact<C>( self, other: C, ) -> ChainUnknownLenI<Self, <C as IntoConcurrentIter>::IntoIter>
Creates a chain of this and
other concurrent iterators. Read moreSource§impl<T> Debug for ConIterEmpty<T>where
T: Debug,
impl<T> Debug for ConIterEmpty<T>where
T: Debug,
Source§impl<T> Default for ConIterEmpty<T>
impl<T> Default for ConIterEmpty<T>
Source§fn default() -> ConIterEmpty<T>
fn default() -> ConIterEmpty<T>
Returns the “default value” for a type. Read more
Source§impl<T> ExactSizeConcurrentIter for ConIterEmpty<T>where
T: Send,
impl<T> ExactSizeConcurrentIter for ConIterEmpty<T>where
T: Send,
Source§fn len(&self) -> usize
fn len(&self) -> usize
Returns the number remaining elements in the concurrent iterator. Read more
Source§fn is_empty(&self) -> bool
fn is_empty(&self) -> bool
Returns true if there are no elements left in the concurrent iterator.
Returns false otherwise. Read more
Source§fn chain<C>(
self,
other: C,
) -> ChainKnownLenI<Self, <C as IntoConcurrentIter>::IntoIter>
fn chain<C>( self, other: C, ) -> ChainKnownLenI<Self, <C as IntoConcurrentIter>::IntoIter>
Creates a chain of this and
other concurrent iterators. Read moreimpl<T> Copy for ConIterEmpty<T>where
T: Copy,
impl<T> Sync for ConIterEmpty<T>
Auto Trait Implementations§
impl<T> Freeze for ConIterEmpty<T>
impl<T> RefUnwindSafe for ConIterEmpty<T>where
T: RefUnwindSafe,
impl<T> Send for ConIterEmpty<T>where
T: Send,
impl<T> Unpin for ConIterEmpty<T>where
T: Unpin,
impl<T> UnwindSafe for ConIterEmpty<T>where
T: 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<I> IntoConcurrentIter for Iwhere
I: ConcurrentIter,
impl<I> IntoConcurrentIter for Iwhere
I: ConcurrentIter,
Source§type Item = <I as ConcurrentIter>::Item
type Item = <I as ConcurrentIter>::Item
Type of the element that the concurrent iterator yields.
Source§fn into_con_iter(self) -> <I as IntoConcurrentIter>::IntoIter
fn into_con_iter(self) -> <I as IntoConcurrentIter>::IntoIter
Trait to convert a source (collection or generator) into a concurrent iterator; i.e.,
ConcurrentIter,
using its into_con_iter method. Read more