[−][src]Trait asparit::IntoParallelRefMutIterator
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<'a, Item = Self::Item>
The type of iterator that will be created.
type Item: Send + 'a
The type of item that will be produced; this is typically an
&'a mut T
reference.
Required methods
pub fn par_iter_mut(&'a mut self) -> Self::Iter
Creates the parallel iterator from self
.
Examples
use asparit::*; let mut v = vec![0usize; 5]; v.par_iter_mut() .enumerate() .for_each(|(i, x)| *x = i) .exec(); assert_eq!(v, [0, 1, 2, 3, 4]);
Implementors
impl<'a, I: ?Sized> IntoParallelRefMutIterator<'a> for I where
I: 'a,
&'a mut I: IntoParallelIterator<'a>,
[src]
I: 'a,
&'a mut I: IntoParallelIterator<'a>,