Trait heron::rapier_plugin::rapier::rayon::prelude::IntoParallelRefMutIterator[][src]

pub trait IntoParallelRefMutIterator<'data> {
    type Iter: ParallelIterator;
    type Item: 'data + Send;
    pub fn par_iter_mut(&'data mut self) -> Self::Iter;
}

IntoParallelRefMutIterator implements the conversion to a ParallelIterator, providing mutable references to the data.

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

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

Associated Types

type Iter: ParallelIterator[src]

The type of iterator that will be created.

type Item: 'data + Send[src]

The type of item that will be produced; this is typically an &'data mut T reference.

Loading content...

Required methods

pub fn par_iter_mut(&'data mut self) -> Self::Iter[src]

Creates the parallel iterator from self.

Examples

use rayon::prelude::*;

let mut v = vec![0usize; 5];
v.par_iter_mut().enumerate().for_each(|(i, x)| *x = i);
assert_eq!(v, [0, 1, 2, 3, 4]);
Loading content...

Implementors

impl<'data, I> IntoParallelRefMutIterator<'data> for I where
    I: 'data + ?Sized,
    &'data mut I: IntoParallelIterator
[src]

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

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

Loading content...