Trait rustc_rayon::iter::IntoParallelIterator [−][src]
pub trait IntoParallelIterator { type Iter: ParallelIterator<Item = Self::Item>; type Item: Send; fn into_par_iter(self) -> Self::Iter; }
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<Item = Self::Item>
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<T: Ord + Send> IntoParallelIterator for BinaryHeap<T>
[src]
impl<T: Ord + Send> IntoParallelIterator for BinaryHeap<T>
impl<'a, T: Ord + Sync> IntoParallelIterator for &'a BinaryHeap<T>
[src]
impl<'a, T: Ord + Sync> IntoParallelIterator for &'a BinaryHeap<T>
type Item = <&'a BinaryHeap<T> as IntoIterator>::Item
type Iter = Iter<'a, T>
fn into_par_iter(self) -> Self::Iter
[src]
fn into_par_iter(self) -> Self::Iter
impl<K: Ord + Send, V: Send> IntoParallelIterator for BTreeMap<K, V>
[src]
impl<K: Ord + Send, V: Send> IntoParallelIterator for BTreeMap<K, V>
type Item = <BTreeMap<K, V> as IntoIterator>::Item
type Iter = IntoIter<K, V>
fn into_par_iter(self) -> Self::Iter
[src]
fn into_par_iter(self) -> Self::Iter
impl<'a, K: Ord + Sync, V: Sync> IntoParallelIterator for &'a BTreeMap<K, V>
[src]
impl<'a, K: Ord + Sync, V: Sync> IntoParallelIterator for &'a BTreeMap<K, V>
type Item = <&'a BTreeMap<K, V> as IntoIterator>::Item
type Iter = Iter<'a, K, V>
fn into_par_iter(self) -> Self::Iter
[src]
fn into_par_iter(self) -> Self::Iter
impl<'a, K: Ord + Sync, V: Send> IntoParallelIterator for &'a mut BTreeMap<K, V>
[src]
impl<'a, K: Ord + Sync, V: Send> IntoParallelIterator for &'a mut BTreeMap<K, V>
type Item = <&'a mut BTreeMap<K, V> as IntoIterator>::Item
type Iter = IterMut<'a, K, V>
fn into_par_iter(self) -> Self::Iter
[src]
fn into_par_iter(self) -> Self::Iter
impl<T: Ord + Send> IntoParallelIterator for BTreeSet<T>
[src]
impl<T: Ord + Send> IntoParallelIterator for BTreeSet<T>
type Item = <BTreeSet<T> as IntoIterator>::Item
type Iter = IntoIter<T>
fn into_par_iter(self) -> Self::Iter
[src]
fn into_par_iter(self) -> Self::Iter
impl<'a, T: Ord + Sync> IntoParallelIterator for &'a BTreeSet<T>
[src]
impl<'a, T: Ord + Sync> IntoParallelIterator for &'a BTreeSet<T>
type Item = <&'a BTreeSet<T> as IntoIterator>::Item
type Iter = Iter<'a, T>
fn into_par_iter(self) -> Self::Iter
[src]
fn into_par_iter(self) -> Self::Iter
impl<K: Hash + Eq + Send, V: Send, S: BuildHasher> IntoParallelIterator for HashMap<K, V, S>
[src]
impl<K: Hash + Eq + Send, V: Send, S: BuildHasher> IntoParallelIterator for HashMap<K, V, S>
type Item = <HashMap<K, V, S> as IntoIterator>::Item
type Iter = IntoIter<K, V>
fn into_par_iter(self) -> Self::Iter
[src]
fn into_par_iter(self) -> Self::Iter
impl<'a, K: Hash + Eq + Sync, V: Sync, S: BuildHasher> IntoParallelIterator for &'a HashMap<K, V, S>
[src]
impl<'a, K: Hash + Eq + Sync, V: Sync, S: BuildHasher> IntoParallelIterator for &'a HashMap<K, V, S>
type Item = <&'a HashMap<K, V, S> as IntoIterator>::Item
type Iter = Iter<'a, K, V>
fn into_par_iter(self) -> Self::Iter
[src]
fn into_par_iter(self) -> Self::Iter
impl<'a, K: Hash + Eq + Sync, V: Send, S: BuildHasher> IntoParallelIterator for &'a mut HashMap<K, V, S>
[src]
impl<'a, K: Hash + Eq + Sync, V: Send, S: BuildHasher> IntoParallelIterator for &'a mut HashMap<K, V, S>
type Item = <&'a mut HashMap<K, V, S> as IntoIterator>::Item
type Iter = IterMut<'a, K, V>
fn into_par_iter(self) -> Self::Iter
[src]
fn into_par_iter(self) -> Self::Iter
impl<T: Hash + Eq + Send, S: BuildHasher> IntoParallelIterator for HashSet<T, S>
[src]
impl<T: Hash + Eq + Send, S: BuildHasher> IntoParallelIterator for HashSet<T, S>
type Item = <HashSet<T, S> as IntoIterator>::Item
type Iter = IntoIter<T>
fn into_par_iter(self) -> Self::Iter
[src]
fn into_par_iter(self) -> Self::Iter
impl<'a, T: Hash + Eq + Sync, S: BuildHasher> IntoParallelIterator for &'a HashSet<T, S>
[src]
impl<'a, T: Hash + Eq + Sync, S: BuildHasher> IntoParallelIterator for &'a HashSet<T, S>
type Item = <&'a HashSet<T, S> as IntoIterator>::Item
type Iter = Iter<'a, T>
fn into_par_iter(self) -> Self::Iter
[src]
fn into_par_iter(self) -> Self::Iter
impl<T: Send> IntoParallelIterator for LinkedList<T>
[src]
impl<T: Send> IntoParallelIterator for LinkedList<T>
type Item = <LinkedList<T> as IntoIterator>::Item
type Iter = IntoIter<T>
fn into_par_iter(self) -> Self::Iter
[src]
fn into_par_iter(self) -> Self::Iter
impl<'a, T: Sync> IntoParallelIterator for &'a LinkedList<T>
[src]
impl<'a, T: Sync> IntoParallelIterator for &'a LinkedList<T>
type Item = <&'a LinkedList<T> as IntoIterator>::Item
type Iter = Iter<'a, T>
fn into_par_iter(self) -> Self::Iter
[src]
fn into_par_iter(self) -> Self::Iter
impl<'a, T: Send> IntoParallelIterator for &'a mut LinkedList<T>
[src]
impl<'a, T: Send> IntoParallelIterator for &'a mut LinkedList<T>
type Item = <&'a mut LinkedList<T> as IntoIterator>::Item
type Iter = IterMut<'a, T>
fn into_par_iter(self) -> Self::Iter
[src]
fn into_par_iter(self) -> Self::Iter
impl<T: Send> IntoParallelIterator for VecDeque<T>
[src]
impl<T: Send> IntoParallelIterator for VecDeque<T>
type Item = <VecDeque<T> as IntoIterator>::Item
type Iter = IntoIter<T>
fn into_par_iter(self) -> Self::Iter
[src]
fn into_par_iter(self) -> Self::Iter
impl<'a, T: Sync> IntoParallelIterator for &'a VecDeque<T>
[src]
impl<'a, T: Sync> IntoParallelIterator for &'a VecDeque<T>
impl<'a, T: Send> IntoParallelIterator for &'a mut VecDeque<T>
[src]
impl<'a, T: Send> IntoParallelIterator for &'a mut VecDeque<T>
impl<T: Send> IntoParallelIterator for Option<T>
[src]
impl<T: Send> IntoParallelIterator for Option<T>
impl<'a, T: Sync> IntoParallelIterator for &'a Option<T>
[src]
impl<'a, T: Sync> IntoParallelIterator for &'a Option<T>
impl<'a, T: Send> IntoParallelIterator for &'a mut Option<T>
[src]
impl<'a, T: Send> IntoParallelIterator for &'a mut Option<T>
impl<T> IntoParallelIterator for Range<T> where
Iter<T>: ParallelIterator,
[src]
impl<T> IntoParallelIterator for Range<T> where
Iter<T>: ParallelIterator,
type Item = <Iter<T> as ParallelIterator>::Item
type Iter = Iter<T>
fn into_par_iter(self) -> Self::Iter
[src]
fn into_par_iter(self) -> Self::Iter
impl<T: Send, E> IntoParallelIterator for Result<T, E>
[src]
impl<T: Send, E> IntoParallelIterator for Result<T, E>
impl<'a, T: Sync, E> IntoParallelIterator for &'a Result<T, E>
[src]
impl<'a, T: Sync, E> IntoParallelIterator for &'a Result<T, E>
impl<'a, T: Send, E> IntoParallelIterator for &'a mut Result<T, E>
[src]
impl<'a, T: Send, E> IntoParallelIterator for &'a mut Result<T, E>
impl<'data, T: Sync + 'data> IntoParallelIterator for &'data [T]
[src]
impl<'data, T: Sync + 'data> IntoParallelIterator for &'data [T]
impl<'data, T: Sync + 'data> IntoParallelIterator for &'data Vec<T>
[src]
impl<'data, T: Sync + 'data> IntoParallelIterator for &'data Vec<T>
impl<'data, T: Send + 'data> IntoParallelIterator for &'data mut [T]
[src]
impl<'data, T: Send + 'data> IntoParallelIterator for &'data mut [T]
impl<'data, T: Send + 'data> IntoParallelIterator for &'data mut Vec<T>
[src]
impl<'data, T: Send + 'data> IntoParallelIterator for &'data mut Vec<T>
impl<T: Send> IntoParallelIterator for Vec<T>
[src]
impl<T: Send> IntoParallelIterator for Vec<T>
Implementors
impl<T: ParallelIterator> IntoParallelIterator for T type Iter = T; type Item = T::Item;