# [−][src]Trait rayon::iter::IntoParallelRefIterator

    pub trait IntoParallelRefIterator<'data> {
        type Iter: ParallelIterator<Item = Self::Item>;
        type Item: Send + 'data;
        fn par_iter(&'data self) -> Self::Iter;
    }

`IntoParallelRefIterator` implements the conversion to a `ParallelIterator`, providing shared references to the data.

This is a parallel version of the `iter()` method defined by various collections.

This trait is automatically implemented `for I where &I: IntoParallelIterator`. In most cases, users will want to implement `IntoParallelIterator` rather than implement this trait directly.

## Associated Types

### `type Iter: ParallelIterator<Item = Self::Item>`

The type of the parallel iterator that will be returned.

### `type Item: Send + 'data`

The type of item that the parallel iterator will produce. This will typically be an `&'data T` reference type.

Loading content...

## Required methods

### `fn par_iter(&'data self) -> Self::Iter`

Converts `self` into a parallel iterator.

# Examples

    use rayon::prelude::*;

    let v: Vec<_> = (0..100).collect();
    assert_eq!(v.par_iter().sum::<i32>(), 100 * 99 / 2);

    // `v.par_iter()` is shorthand for `(&v).into_par_iter()`,
    // producing the exact same references.
    assert!(v.par_iter().zip(&v)
             .all(|(a, b)| std::ptr::eq(a, b)));

Loading content...

## Implementors

### `impl<'data, I: 'data + ?Sized> IntoParallelRefIterator<'data> for I where
&'data I: IntoParallelIterator,` [src]

#### `type Iter = <&'data I as IntoParallelIterator>::Iter`

#### `type Item = <&'data I as IntoParallelIterator>::Item`

#### `fn par_iter(&'data self) -> Self::Iter`[src]

Loading content...

# Help

## Keyboard Shortcuts

`?`
  Show this help dialog
`S`
  Focus the search field
`↑`
  Move up in search results
`↓`
  Move down in search results
`↹`
  Switch tab
`⏎`
  Go to active search result
`+`
  Expand all sections
`-`
  Collapse all sections

## Search Tricks

Prefix searches with a type followed by a colon (e.g., `fn:`) to restrict the search to a given type.

Accepted types are: `fn`, `mod`, `struct`, `enum`, `trait`, `type`, `macro`, and `const`.

Search functions by type signature (e.g., `vec -> usize` or `* -> vec`)

Search multiple things at once by splitting your query with comma (e.g., `str,u8` or `String,struct:Vec,test`)