Trait orx_concurrent_iter::AtomicIter
source · pub trait AtomicIter: Send + Sync {
type Item: Send + Sync;
// Required methods
fn counter(&self) -> &AtomicCounter;
fn get(&self, item_idx: usize) -> Option<Self::Item>;
fn fetch_n(&self, n: usize) -> impl NextChunk<Self::Item>;
// Provided method
fn fetch_one(&self) -> Option<Next<Self::Item>> { ... }
}
Expand description
Trait defining a set of concurrent iterators which internally uses an atomic counter of elements to be yielded.
Note that every A: AtomicIter
also implements ConcurrentIter
.
Required Associated Types§
Required Methods§
sourcefn counter(&self) -> &AtomicCounter
fn counter(&self) -> &AtomicCounter
Returns a reference to the underlying advanced item counter.
Provided Methods§
Object Safety§
This trait is not object safe.