pub trait GetIterator {
type Item;
type Iterator: Iterator<Item = Self::Item>;
type ParallelIterator: ParallelIterator<Item = Self::Item>
where Self::Item: Send;
// Required method
fn iter(&self) -> Self::Iterator;
// Provided methods
fn par_iter(&self) -> Option<Self::ParallelIterator>
where Self::Item: Send { ... }
fn has_par_iter(&self) -> bool { ... }
fn len(&self) -> usize { ... }
}Expand description
Trait for returning iterator and (optionally) parallel iterator over keys.
Required Associated Types§
Sourcetype ParallelIterator: ParallelIterator<Item = Self::Item>
where
Self::Item: Send
type ParallelIterator: ParallelIterator<Item = Self::Item> where Self::Item: Send
Parallel iterator type.
Required Methods§
Provided Methods§
Sourcefn par_iter(&self) -> Option<Self::ParallelIterator>
fn par_iter(&self) -> Option<Self::ParallelIterator>
If possible, returns parallel iterator over keys.
Sourcefn has_par_iter(&self) -> bool
fn has_par_iter(&self) -> bool
Returns true only if par_iter returns Some.