[−]Trait astral::thirdparty::rayon::iter::IntoParallelIterator
IntoParallelIterator
implements the conversion to a ParallelIterator
.
By implementing IntoParallelIterator
for a type, you define how it will
transformed into an iterator. This is a parallel version of the standard
library's std::iter::IntoIterator
trait.
Associated Types
type Iter: ParallelIterator
The parallel iterator type that will be created.
type Item: Send
The type of item that the parallel iterator will produce.
Required methods
fn into_par_iter(self) -> Self::Iter
Converts self
into a parallel iterator.
Examples
use rayon::prelude::*; println!("counting in parallel:"); (0..100).into_par_iter() .for_each(|i| println!("{}", i));
This conversion is often implicit for arguments to methods like zip
.
use rayon::prelude::*; let v: Vec<_> = (0..5).into_par_iter().zip(5..10).collect(); assert_eq!(v, [(0, 5), (1, 6), (2, 7), (3, 8), (4, 9)]);
Implementations on Foreign Types
impl<K, V> IntoParallelIterator for BTreeMap<K, V> where
K: Send + Ord,
V: Send,
[src]
K: Send + Ord,
V: Send,
type Item = <BTreeMap<K, V> as IntoIterator>::Item
type Iter = IntoIter<K, V>
fn into_par_iter(self) -> <BTreeMap<K, V> as IntoParallelIterator>::Iter
[src]
impl<'a, T> IntoParallelIterator for &'a Option<T> where
T: Sync,
[src]
T: Sync,
type Item = &'a T
type Iter = Iter<'a, T>
fn into_par_iter(self) -> <&'a Option<T> as IntoParallelIterator>::Iter
[src]
impl<'a, T, E> IntoParallelIterator for &'a Result<T, E> where
T: Sync,
[src]
T: Sync,
type Item = &'a T
type Iter = Iter<'a, T>
fn into_par_iter(self) -> <&'a Result<T, E> as IntoParallelIterator>::Iter
[src]
impl<'a, K, V> IntoParallelIterator for &'a BTreeMap<K, V> where
K: Sync + Ord,
V: Sync,
[src]
K: Sync + Ord,
V: Sync,
type Item = <&'a BTreeMap<K, V> as IntoIterator>::Item
type Iter = Iter<'a, K, V>
fn into_par_iter(self) -> <&'a BTreeMap<K, V> as IntoParallelIterator>::Iter
[src]
impl<'a, T, S> IntoParallelIterator for &'a HashSet<T, S> where
S: BuildHasher,
T: Sync + Eq + Hash,
[src]
S: BuildHasher,
T: Sync + Eq + Hash,
type Item = <&'a HashSet<T, S> as IntoIterator>::Item
type Iter = Iter<'a, T>
fn into_par_iter(self) -> <&'a HashSet<T, S> as IntoParallelIterator>::Iter
[src]
impl<T> IntoParallelIterator for Vec<T> where
T: Send,
[src]
T: Send,
type Item = T
type Iter = IntoIter<T>
fn into_par_iter(self) -> <Vec<T> as IntoParallelIterator>::Iter
[src]
impl<T, S> IntoParallelIterator for HashSet<T, S> where
S: BuildHasher,
T: Send + Eq + Hash,
[src]
S: BuildHasher,
T: Send + Eq + Hash,
type Item = <HashSet<T, S> as IntoIterator>::Item
type Iter = IntoIter<T>
fn into_par_iter(self) -> <HashSet<T, S> as IntoParallelIterator>::Iter
[src]
impl<'a, T> IntoParallelIterator for &'a mut Option<T> where
T: Send,
[src]
T: Send,
type Item = &'a mut T
type Iter = IterMut<'a, T>
fn into_par_iter(self) -> <&'a mut Option<T> as IntoParallelIterator>::Iter
[src]
impl<T> IntoParallelIterator for BTreeSet<T> where
T: Send + Ord,
[src]
T: Send + Ord,
type Item = <BTreeSet<T> as IntoIterator>::Item
type Iter = IntoIter<T>
fn into_par_iter(self) -> <BTreeSet<T> as IntoParallelIterator>::Iter
[src]
impl<T, E> IntoParallelIterator for Result<T, E> where
T: Send,
[src]
T: Send,
type Item = T
type Iter = IntoIter<T>
fn into_par_iter(self) -> <Result<T, E> as IntoParallelIterator>::Iter
[src]
impl<'a, K, V> IntoParallelIterator for &'a mut BTreeMap<K, V> where
K: Sync + Ord,
V: Send,
[src]
K: Sync + Ord,
V: Send,
type Item = <&'a mut BTreeMap<K, V> as IntoIterator>::Item
type Iter = IterMut<'a, K, V>
fn into_par_iter(self) -> <&'a mut BTreeMap<K, V> as IntoParallelIterator>::Iter
[src]
impl<T> IntoParallelIterator for LinkedList<T> where
T: Send,
[src]
T: Send,
type Item = <LinkedList<T> as IntoIterator>::Item
type Iter = IntoIter<T>
fn into_par_iter(self) -> <LinkedList<T> as IntoParallelIterator>::Iter
[src]
impl<T> IntoParallelIterator for VecDeque<T> where
T: Send,
[src]
T: Send,
type Item = <VecDeque<T> as IntoIterator>::Item
type Iter = IntoIter<T>
fn into_par_iter(self) -> <VecDeque<T> as IntoParallelIterator>::Iter
[src]
impl<T> IntoParallelIterator for Range<T> where
Iter<T>: ParallelIterator,
[src]
Iter<T>: ParallelIterator,
type Item = <Iter<T> as ParallelIterator>::Item
type Iter = Iter<T>
fn into_par_iter(self) -> <Range<T> as IntoParallelIterator>::Iter
[src]
impl<'data, T> IntoParallelIterator for &'data Vec<T> where
T: 'data + Sync,
[src]
T: 'data + Sync,
type Item = &'data T
type Iter = Iter<'data, T>
fn into_par_iter(self) -> <&'data Vec<T> as IntoParallelIterator>::Iter
[src]
impl<K, V, S> IntoParallelIterator for HashMap<K, V, S> where
K: Send + Eq + Hash,
S: BuildHasher,
V: Send,
[src]
K: Send + Eq + Hash,
S: BuildHasher,
V: Send,
type Item = <HashMap<K, V, S> as IntoIterator>::Item
type Iter = IntoIter<K, V>
fn into_par_iter(self) -> <HashMap<K, V, S> as IntoParallelIterator>::Iter
[src]
impl<'a, T, E> IntoParallelIterator for &'a mut Result<T, E> where
T: Send,
[src]
T: Send,
type Item = &'a mut T
type Iter = IterMut<'a, T>
fn into_par_iter(self) -> <&'a mut Result<T, E> as IntoParallelIterator>::Iter
[src]
impl<T> IntoParallelIterator for BinaryHeap<T> where
T: Send + Ord,
[src]
T: Send + Ord,
type Item = T
type Iter = IntoIter<T>
fn into_par_iter(self) -> <BinaryHeap<T> as IntoParallelIterator>::Iter
[src]
impl<'a, T> IntoParallelIterator for &'a mut VecDeque<T> where
T: Send,
[src]
T: Send,
type Item = &'a mut T
type Iter = IterMut<'a, T>
fn into_par_iter(self) -> <&'a mut VecDeque<T> as IntoParallelIterator>::Iter
[src]
impl<'data, T> IntoParallelIterator for &'data [T] where
T: 'data + Sync,
[src]
T: 'data + Sync,
type Item = &'data T
type Iter = Iter<'data, T>
fn into_par_iter(self) -> <&'data [T] as IntoParallelIterator>::Iter
[src]
impl<'a, K, V, S> IntoParallelIterator for &'a mut HashMap<K, V, S> where
K: Sync + Eq + Hash,
S: BuildHasher,
V: Send,
[src]
K: Sync + Eq + Hash,
S: BuildHasher,
V: Send,
type Item = <&'a mut HashMap<K, V, S> as IntoIterator>::Item
type Iter = IterMut<'a, K, V>
fn into_par_iter(
self
) -> <&'a mut HashMap<K, V, S> as IntoParallelIterator>::Iter
[src]
self
) -> <&'a mut HashMap<K, V, S> as IntoParallelIterator>::Iter
impl<'a, T> IntoParallelIterator for &'a mut LinkedList<T> where
T: Send,
[src]
T: Send,
type Item = <&'a mut LinkedList<T> as IntoIterator>::Item
type Iter = IterMut<'a, T>
fn into_par_iter(self) -> <&'a mut LinkedList<T> as IntoParallelIterator>::Iter
[src]
impl<'a, K, V, S> IntoParallelIterator for &'a HashMap<K, V, S> where
K: Sync + Eq + Hash,
S: BuildHasher,
V: Sync,
[src]
K: Sync + Eq + Hash,
S: BuildHasher,
V: Sync,
type Item = <&'a HashMap<K, V, S> as IntoIterator>::Item
type Iter = Iter<'a, K, V>
fn into_par_iter(self) -> <&'a HashMap<K, V, S> as IntoParallelIterator>::Iter
[src]
impl<'a, T> IntoParallelIterator for &'a LinkedList<T> where
T: Sync,
[src]
T: Sync,
type Item = <&'a LinkedList<T> as IntoIterator>::Item
type Iter = Iter<'a, T>
fn into_par_iter(self) -> <&'a LinkedList<T> as IntoParallelIterator>::Iter
[src]
impl<'a, T> IntoParallelIterator for &'a BTreeSet<T> where
T: Sync + Ord,
[src]
T: Sync + Ord,
type Item = <&'a BTreeSet<T> as IntoIterator>::Item
type Iter = Iter<'a, T>
fn into_par_iter(self) -> <&'a BTreeSet<T> as IntoParallelIterator>::Iter
[src]
impl<'data, T> IntoParallelIterator for &'data mut [T] where
T: 'data + Send,
[src]
T: 'data + Send,
type Item = &'data mut T
type Iter = IterMut<'data, T>
fn into_par_iter(self) -> <&'data mut [T] as IntoParallelIterator>::Iter
[src]
impl<'a, T> IntoParallelIterator for &'a BinaryHeap<T> where
T: Sync + Ord,
[src]
T: Sync + Ord,
type Item = <&'a BinaryHeap<T> as IntoIterator>::Item
type Iter = Iter<'a, T>
fn into_par_iter(self) -> <&'a BinaryHeap<T> as IntoParallelIterator>::Iter
[src]
impl<T> IntoParallelIterator for Option<T> where
T: Send,
[src]
T: Send,
type Item = T
type Iter = IntoIter<T>
fn into_par_iter(self) -> <Option<T> as IntoParallelIterator>::Iter
[src]
impl<'data, T> IntoParallelIterator for &'data mut Vec<T> where
T: 'data + Send,
[src]
T: 'data + Send,
type Item = &'data mut T
type Iter = IterMut<'data, T>
fn into_par_iter(self) -> <&'data mut Vec<T> as IntoParallelIterator>::Iter
[src]
impl<'a, T> IntoParallelIterator for &'a VecDeque<T> where
T: Sync,
[src]
T: Sync,
type Item = &'a T
type Iter = Iter<'a, T>
fn into_par_iter(self) -> <&'a VecDeque<T> as IntoParallelIterator>::Iter
[src]
Implementors
impl<T> IntoParallelIterator for T where
T: ParallelIterator,
[src]
T: ParallelIterator,