pub struct ConIterOfVec<T: Send + Sync + Default> { /* private fields */ }
Expand description

A concurrent iterator over a vector, consuming the vector and yielding its elements.

Implementations§

source§

impl<T: Send + Sync + Default> ConIterOfVec<T>

source

pub fn new(vec: Vec<T>) -> Self

Consumes and creates a concurrent iterator of the given vec.

Trait Implementations§

source§

impl<T: Send + Sync + Default> AtomicIter for ConIterOfVec<T>

§

type Item = T

Type of the items that the iterator yields.
source§

fn counter(&self) -> &AtomicCounter

Returns a reference to the underlying advanced item counter.
source§

fn get(&self, item_idx: usize) -> Option<Self::Item>

Returns the item_idx-th item that the iterator yields; returns None if the iterator completes before.
source§

fn fetch_one(&self) -> Option<Next<Self::Item>>

Returns the next item that the iterator yields; returns None if the iteration has completed.
source§

fn fetch_n( &self, n: usize ) -> NextMany<Self::Item, impl Iterator<Item = Self::Item>>

Returns an iterator of the next n consecutive items that the iterator yields. It might return an iterator of less or no items if the iteration does not have sufficient elements left.
source§

impl<T: Send + Sync + Default> AtomicIterWithInitialLen for ConIterOfVec<T>

source§

fn initial_len(&self) -> usize

Returns the initial length of the atomic iterator.
source§

impl<T: Debug + Send + Sync + Default> Debug for ConIterOfVec<T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<T: Send + Sync + Default> From<Vec<T>> for ConIterOfVec<T>

source§

fn from(vec: Vec<T>) -> Self

Consumes and creates a concurrent iterator of the given vec.

source§

impl<T: Send + Sync + Default> Send for ConIterOfVec<T>

source§

impl<T: Send + Sync + Default> Sync for ConIterOfVec<T>

Auto Trait Implementations§

§

impl<T> !Freeze for ConIterOfVec<T>

§

impl<T> !RefUnwindSafe for ConIterOfVec<T>

§

impl<T> Unpin for ConIterOfVec<T>
where T: Unpin,

§

impl<T> UnwindSafe for ConIterOfVec<T>
where T: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<A> ConcurrentIter for A
where A: AtomicIter,

§

type Item = <A as AtomicIter>::Item

Type of the items that the iterator yields.
source§

fn next_id_and_value(&self) -> Option<Next<<A as AtomicIter>::Item>>

Advances the iterator and returns the next value together with its enumeration index. Read more
source§

fn next_id_and_chunk( &self, n: usize ) -> NextMany<<A as AtomicIter>::Item, impl Iterator<Item = <A as AtomicIter>::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 more
source§

fn next(&self) -> Option<Self::Item>

Advances the iterator and returns the next value. Read more
source§

fn next_chunk(&self, chunk_size: usize) -> impl Iterator<Item = Self::Item>

Advances the iterator chunk_size times and returns an iterator of at most chunk_size consecutive next values. Read more
source§

fn values(&self) -> ConIterValues<'_, Self>
where Self: Sized,

Returns an Iterator over the values of elements of the concurrent iterator. Read more
source§

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 more
source§

impl<A> ExactSizeConcurrentIter for A

source§

fn len(&self) -> usize

Returns the exact remaining length of the concurrent iterator.
source§

fn is_empty(&self) -> bool

Returns true if the iterator is empty.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.