[][src]Struct rayon::range::Iter

pub struct Iter<T> { /* fields omitted */ }

Parallel iterator over a range, implemented for all integer types.

Note: The zip operation requires IndexedParallelIterator which is not implemented for u64, i64, u128, or i128.

use rayon::prelude::*;

let p = (0..25usize).into_par_iter()
                  .zip(0..25usize)
                  .filter(|&(x, y)| x % 5 == 0 || y % 5 == 0)
                  .map(|(x, y)| x * y)
                  .sum::<usize>();

let s = (0..25usize).zip(0..25)
                  .filter(|&(x, y)| x % 5 == 0 || y % 5 == 0)
                  .map(|(x, y)| x * y)
                  .sum();

assert_eq!(p, s);

Trait Implementations

impl<T: Clone> Clone for Iter<T>[src]

impl<T: Debug> Debug for Iter<T>[src]

impl IndexedParallelIterator for Iter<u8>[src]

impl IndexedParallelIterator for Iter<u16>[src]

impl IndexedParallelIterator for Iter<u32>[src]

impl IndexedParallelIterator for Iter<usize>[src]

impl IndexedParallelIterator for Iter<i8>[src]

impl IndexedParallelIterator for Iter<i16>[src]

impl IndexedParallelIterator for Iter<i32>[src]

impl IndexedParallelIterator for Iter<isize>[src]

impl ParallelIterator for Iter<u8>[src]

type Item = u8

The type of item that this parallel iterator produces. For example, if you use the [for_each] method, this is the type of item that your closure will be invoked with. Read more

impl ParallelIterator for Iter<u16>[src]

type Item = u16

The type of item that this parallel iterator produces. For example, if you use the [for_each] method, this is the type of item that your closure will be invoked with. Read more

impl ParallelIterator for Iter<u128>[src]

type Item = u128

The type of item that this parallel iterator produces. For example, if you use the [for_each] method, this is the type of item that your closure will be invoked with. Read more

impl ParallelIterator for Iter<i128>[src]

type Item = i128

The type of item that this parallel iterator produces. For example, if you use the [for_each] method, this is the type of item that your closure will be invoked with. Read more

impl ParallelIterator for Iter<u32>[src]

type Item = u32

The type of item that this parallel iterator produces. For example, if you use the [for_each] method, this is the type of item that your closure will be invoked with. Read more

impl ParallelIterator for Iter<usize>[src]

type Item = usize

The type of item that this parallel iterator produces. For example, if you use the [for_each] method, this is the type of item that your closure will be invoked with. Read more

impl ParallelIterator for Iter<i8>[src]

type Item = i8

The type of item that this parallel iterator produces. For example, if you use the [for_each] method, this is the type of item that your closure will be invoked with. Read more

impl ParallelIterator for Iter<i16>[src]

type Item = i16

The type of item that this parallel iterator produces. For example, if you use the [for_each] method, this is the type of item that your closure will be invoked with. Read more

impl ParallelIterator for Iter<i32>[src]

type Item = i32

The type of item that this parallel iterator produces. For example, if you use the [for_each] method, this is the type of item that your closure will be invoked with. Read more

impl ParallelIterator for Iter<isize>[src]

type Item = isize

The type of item that this parallel iterator produces. For example, if you use the [for_each] method, this is the type of item that your closure will be invoked with. Read more

impl ParallelIterator for Iter<u64>[src]

type Item = u64

The type of item that this parallel iterator produces. For example, if you use the [for_each] method, this is the type of item that your closure will be invoked with. Read more

impl ParallelIterator for Iter<i64>[src]

type Item = i64

The type of item that this parallel iterator produces. For example, if you use the [for_each] method, this is the type of item that your closure will be invoked with. Read more

Auto Trait Implementations

impl<T> RefUnwindSafe for Iter<T> where
    T: RefUnwindSafe

impl<T> Send for Iter<T> where
    T: Send

impl<T> Sync for Iter<T> where
    T: Sync

impl<T> Unpin for Iter<T> where
    T: Unpin

impl<T> UnwindSafe for Iter<T> where
    T: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> IntoParallelIterator for T where
    T: ParallelIterator
[src]

type Iter = T

The parallel iterator type that will be created.

type Item = <T as ParallelIterator>::Item

The type of item that the parallel iterator will produce.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.