pub struct MultiZip<T> { /* private fields */ }
Expand description
MultiZip
is an iterator that zips up a tuple of parallel iterators to
produce tuples of their items.
It is created by calling into_par_iter()
on a tuple of types that
implement IntoParallelIterator
, or par_iter()
/par_iter_mut()
with
types that are iterable by reference.
The implementation currently support tuples up to length 12.
Examples
use rayon::prelude::*;
// This will iterate `r` by mutable reference, like `par_iter_mut()`, while
// ranges are all iterated by value like `into_par_iter()`.
// Note that the zipped iterator is only as long as the shortest input.
let mut r = vec![0; 3];
(&mut r, 1..10, 10..100, 100..1000).into_par_iter()
.for_each(|(r, x, y, z)| *r = x * y + z);
assert_eq!(&r, &[1 * 10 + 100, 2 * 11 + 101, 3 * 12 + 102]);
For a group that should all be iterated by reference, you can use a tuple reference.
use rayon::prelude::*;
let xs: Vec<_> = (1..10).collect();
let ys: Vec<_> = (10..100).collect();
let zs: Vec<_> = (100..1000).collect();
// Reference each input separately with `IntoParallelIterator`:
let r1: Vec<_> = (&xs, &ys, &zs).into_par_iter()
.map(|(x, y, z)| x * y + z)
.collect();
// Reference them all together with `IntoParallelRefIterator`:
let r2: Vec<_> = (xs, ys, zs).par_iter()
.map(|(x, y, z)| x * y + z)
.collect();
assert_eq!(r1, r2);
Mutable references to a tuple will work similarly.
use rayon::prelude::*;
let mut xs: Vec<_> = (1..4).collect();
let mut ys: Vec<_> = (-4..-1).collect();
let mut zs = vec![0; 3];
// Mutably reference each input separately with `IntoParallelIterator`:
(&mut xs, &mut ys, &mut zs).into_par_iter().for_each(|(x, y, z)| {
*z += *x + *y;
std::mem::swap(x, y);
});
assert_eq!(xs, (vec![-4, -3, -2]));
assert_eq!(ys, (vec![1, 2, 3]));
assert_eq!(zs, (vec![-3, -1, 1]));
// Mutably reference them all together with `IntoParallelRefMutIterator`:
let mut tuple = (xs, ys, zs);
tuple.par_iter_mut().for_each(|(x, y, z)| {
*z += *x + *y;
std::mem::swap(x, y);
});
assert_eq!(tuple, (vec![1, 2, 3], vec![-4, -3, -2], vec![-6, -2, 2]));
Trait Implementations
sourceimpl<A, B, C, D, E, F, G, H, I, J, K, L> IndexedParallelIterator for MultiZip<(A, B, C, D, E, F, G, H, I, J, K, L)>where
A: IndexedParallelIterator,
B: IndexedParallelIterator,
C: IndexedParallelIterator,
D: IndexedParallelIterator,
E: IndexedParallelIterator,
F: IndexedParallelIterator,
G: IndexedParallelIterator,
H: IndexedParallelIterator,
I: IndexedParallelIterator,
J: IndexedParallelIterator,
K: IndexedParallelIterator,
L: IndexedParallelIterator,
impl<A, B, C, D, E, F, G, H, I, J, K, L> IndexedParallelIterator for MultiZip<(A, B, C, D, E, F, G, H, I, J, K, L)>where
A: IndexedParallelIterator,
B: IndexedParallelIterator,
C: IndexedParallelIterator,
D: IndexedParallelIterator,
E: IndexedParallelIterator,
F: IndexedParallelIterator,
G: IndexedParallelIterator,
H: IndexedParallelIterator,
I: IndexedParallelIterator,
J: IndexedParallelIterator,
K: IndexedParallelIterator,
L: IndexedParallelIterator,
sourcefn drive<CONSUMER>(self, consumer: CONSUMER) -> CONSUMER::Resultwhere
CONSUMER: Consumer<Self::Item>,
fn drive<CONSUMER>(self, consumer: CONSUMER) -> CONSUMER::Resultwhere
CONSUMER: Consumer<Self::Item>,
Internal method used to define the behavior of this parallel
iterator. You should not need to call this directly. Read more
sourcefn len(&self) -> usize
fn len(&self) -> usize
Produces an exact count of how many items this iterator will
produce, presuming no panic occurs. Read more
sourcefn with_producer<CB>(self, callback: CB) -> CB::Outputwhere
CB: ProducerCallback<Self::Item>,
fn with_producer<CB>(self, callback: CB) -> CB::Outputwhere
CB: ProducerCallback<Self::Item>,
Internal method used to define the behavior of this parallel
iterator. You should not need to call this directly. Read more
sourcefn by_exponential_blocks(self) -> ExponentialBlocks<Self>
fn by_exponential_blocks(self) -> ExponentialBlocks<Self>
Divides an iterator into sequential blocks of exponentially-increasing size. Read more
sourcefn by_uniform_blocks(self, block_size: usize) -> UniformBlocks<Self>
fn by_uniform_blocks(self, block_size: usize) -> UniformBlocks<Self>
Divides an iterator into sequential blocks of the given size. Read more
sourcefn collect_into_vec(self, target: &mut Vec<Self::Item>)
fn collect_into_vec(self, target: &mut Vec<Self::Item>)
Collects the results of the iterator into the specified
vector. The vector is always cleared before execution
begins. If possible, reusing the vector across calls can lead
to better performance since it reuses the same backing buffer. Read more
sourcefn unzip_into_vecs<A, B>(self, left: &mut Vec<A>, right: &mut Vec<B>)where
Self: IndexedParallelIterator<Item = (A, B)>,
A: Send,
B: Send,
fn unzip_into_vecs<A, B>(self, left: &mut Vec<A>, right: &mut Vec<B>)where
Self: IndexedParallelIterator<Item = (A, B)>,
A: Send,
B: Send,
Unzips the results of the iterator into the specified
vectors. The vectors are always cleared before execution
begins. If possible, reusing the vectors across calls can lead
to better performance since they reuse the same backing buffer. Read more
sourcefn zip<Z>(self, zip_op: Z) -> Zip<Self, Z::Iter>where
Z: IntoParallelIterator,
Z::Iter: IndexedParallelIterator,
fn zip<Z>(self, zip_op: Z) -> Zip<Self, Z::Iter>where
Z: IntoParallelIterator,
Z::Iter: IndexedParallelIterator,
Iterates over tuples
(A, B)
, where the items A
are from
this iterator and B
are from the iterator given as argument.
Like the zip
method on ordinary iterators, if the two
iterators are of unequal length, you only get the items they
have in common. Read moresourcefn zip_eq<Z>(self, zip_op: Z) -> ZipEq<Self, Z::Iter>where
Z: IntoParallelIterator,
Z::Iter: IndexedParallelIterator,
fn zip_eq<Z>(self, zip_op: Z) -> ZipEq<Self, Z::Iter>where
Z: IntoParallelIterator,
Z::Iter: IndexedParallelIterator,
The same as
Zip
, but requires that both iterators have the same length. Read moresourcefn interleave<I>(self, other: I) -> Interleave<Self, I::Iter>where
I: IntoParallelIterator<Item = Self::Item>,
I::Iter: IndexedParallelIterator<Item = Self::Item>,
fn interleave<I>(self, other: I) -> Interleave<Self, I::Iter>where
I: IntoParallelIterator<Item = Self::Item>,
I::Iter: IndexedParallelIterator<Item = Self::Item>,
Interleaves elements of this iterator and the other given
iterator. Alternately yields elements from this iterator and
the given iterator, until both are exhausted. If one iterator
is exhausted before the other, the last elements are provided
from the other. Read more
sourcefn interleave_shortest<I>(self, other: I) -> InterleaveShortest<Self, I::Iter>where
I: IntoParallelIterator<Item = Self::Item>,
I::Iter: IndexedParallelIterator<Item = Self::Item>,
fn interleave_shortest<I>(self, other: I) -> InterleaveShortest<Self, I::Iter>where
I: IntoParallelIterator<Item = Self::Item>,
I::Iter: IndexedParallelIterator<Item = Self::Item>,
Interleaves elements of this iterator and the other given
iterator, until one is exhausted. Read more
sourcefn chunks(self, chunk_size: usize) -> Chunks<Self>
fn chunks(self, chunk_size: usize) -> Chunks<Self>
Splits an iterator up into fixed-size chunks. Read more
sourcefn fold_chunks<T, ID, F>(
self,
chunk_size: usize,
identity: ID,
fold_op: F
) -> FoldChunks<Self, ID, F>where
ID: Fn() -> T + Send + Sync,
F: Fn(T, Self::Item) -> T + Send + Sync,
T: Send,
fn fold_chunks<T, ID, F>(
self,
chunk_size: usize,
identity: ID,
fold_op: F
) -> FoldChunks<Self, ID, F>where
ID: Fn() -> T + Send + Sync,
F: Fn(T, Self::Item) -> T + Send + Sync,
T: Send,
sourcefn fold_chunks_with<T, F>(
self,
chunk_size: usize,
init: T,
fold_op: F
) -> FoldChunksWith<Self, T, F>where
T: Send + Clone,
F: Fn(T, Self::Item) -> T + Send + Sync,
fn fold_chunks_with<T, F>(
self,
chunk_size: usize,
init: T,
fold_op: F
) -> FoldChunksWith<Self, T, F>where
T: Send + Clone,
F: Fn(T, Self::Item) -> T + Send + Sync,
sourcefn partial_cmp<I>(self, other: I) -> Option<Ordering>where
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
fn partial_cmp<I>(self, other: I) -> Option<Ordering>where
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
Lexicographically compares the elements of this
ParallelIterator
with those of
another. Read moresourcefn eq<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialEq<I::Item>,
fn eq<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialEq<I::Item>,
Determines if the elements of this
ParallelIterator
are equal to those of another Read moresourcefn ne<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialEq<I::Item>,
fn ne<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialEq<I::Item>,
Determines if the elements of this
ParallelIterator
are unequal to those of another Read moresourcefn lt<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
fn lt<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
Determines if the elements of this
ParallelIterator
are lexicographically less than those of another. Read moresourcefn le<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
fn le<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
Determines if the elements of this
ParallelIterator
are less or equal to those of another. Read moresourcefn gt<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
fn gt<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
Determines if the elements of this
ParallelIterator
are lexicographically greater than those of another. Read moresourcefn ge<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
fn ge<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
Determines if the elements of this
ParallelIterator
are less or equal to those of another. Read moresourcefn step_by(self, step: usize) -> StepBy<Self>
fn step_by(self, step: usize) -> StepBy<Self>
Creates an iterator that steps by the given amount Read more
sourcefn skip(self, n: usize) -> Skip<Self>
fn skip(self, n: usize) -> Skip<Self>
Creates an iterator that skips the first
n
elements. Read moresourcefn take(self, n: usize) -> Take<Self>
fn take(self, n: usize) -> Take<Self>
Creates an iterator that yields the first
n
elements. Read moresourcefn position_any<P>(self, predicate: P) -> Option<usize>where
P: Fn(Self::Item) -> bool + Sync + Send,
fn position_any<P>(self, predicate: P) -> Option<usize>where
P: Fn(Self::Item) -> bool + Sync + Send,
Searches for some item in the parallel iterator that
matches the given predicate, and returns its index. Like
ParallelIterator::find_any
, the parallel search will not
necessarily find the first match, and once a match is
found we’ll attempt to stop processing any more. Read moresourcefn position_first<P>(self, predicate: P) -> Option<usize>where
P: Fn(Self::Item) -> bool + Sync + Send,
fn position_first<P>(self, predicate: P) -> Option<usize>where
P: Fn(Self::Item) -> bool + Sync + Send,
Searches for the sequentially first item in the parallel iterator
that matches the given predicate, and returns its index. Read more
sourcefn position_last<P>(self, predicate: P) -> Option<usize>where
P: Fn(Self::Item) -> bool + Sync + Send,
fn position_last<P>(self, predicate: P) -> Option<usize>where
P: Fn(Self::Item) -> bool + Sync + Send,
Searches for the sequentially last item in the parallel iterator
that matches the given predicate, and returns its index. Read more
sourcefn positions<P>(self, predicate: P) -> Positions<Self, P>where
P: Fn(Self::Item) -> bool + Sync + Send,
fn positions<P>(self, predicate: P) -> Positions<Self, P>where
P: Fn(Self::Item) -> bool + Sync + Send,
Searches for items in the parallel iterator that match the given
predicate, and returns their indices. Read more
sourcefn rev(self) -> Rev<Self>
fn rev(self) -> Rev<Self>
Produces a new iterator with the elements of this iterator in
reverse order. Read more
sourcefn with_min_len(self, min: usize) -> MinLen<Self>
fn with_min_len(self, min: usize) -> MinLen<Self>
Sets the minimum length of iterators desired to process in each
rayon job. Rayon will not split any smaller than this length, but
of course an iterator could already be smaller to begin with. Read more
sourcefn with_max_len(self, max: usize) -> MaxLen<Self>
fn with_max_len(self, max: usize) -> MaxLen<Self>
Sets the maximum length of iterators desired to process in each
rayon job. Rayon will try to split at least below this length,
unless that would put it below the length from
with_min_len()
.
For example, given min=10 and max=15, a length of 16 will not be
split any further. Read moresourceimpl<A, B, C, D, E, F, G, H, I, J, K> IndexedParallelIterator for MultiZip<(A, B, C, D, E, F, G, H, I, J, K)>where
A: IndexedParallelIterator,
B: IndexedParallelIterator,
C: IndexedParallelIterator,
D: IndexedParallelIterator,
E: IndexedParallelIterator,
F: IndexedParallelIterator,
G: IndexedParallelIterator,
H: IndexedParallelIterator,
I: IndexedParallelIterator,
J: IndexedParallelIterator,
K: IndexedParallelIterator,
impl<A, B, C, D, E, F, G, H, I, J, K> IndexedParallelIterator for MultiZip<(A, B, C, D, E, F, G, H, I, J, K)>where
A: IndexedParallelIterator,
B: IndexedParallelIterator,
C: IndexedParallelIterator,
D: IndexedParallelIterator,
E: IndexedParallelIterator,
F: IndexedParallelIterator,
G: IndexedParallelIterator,
H: IndexedParallelIterator,
I: IndexedParallelIterator,
J: IndexedParallelIterator,
K: IndexedParallelIterator,
sourcefn drive<CONSUMER>(self, consumer: CONSUMER) -> CONSUMER::Resultwhere
CONSUMER: Consumer<Self::Item>,
fn drive<CONSUMER>(self, consumer: CONSUMER) -> CONSUMER::Resultwhere
CONSUMER: Consumer<Self::Item>,
Internal method used to define the behavior of this parallel
iterator. You should not need to call this directly. Read more
sourcefn len(&self) -> usize
fn len(&self) -> usize
Produces an exact count of how many items this iterator will
produce, presuming no panic occurs. Read more
sourcefn with_producer<CB>(self, callback: CB) -> CB::Outputwhere
CB: ProducerCallback<Self::Item>,
fn with_producer<CB>(self, callback: CB) -> CB::Outputwhere
CB: ProducerCallback<Self::Item>,
Internal method used to define the behavior of this parallel
iterator. You should not need to call this directly. Read more
sourcefn by_exponential_blocks(self) -> ExponentialBlocks<Self>
fn by_exponential_blocks(self) -> ExponentialBlocks<Self>
Divides an iterator into sequential blocks of exponentially-increasing size. Read more
sourcefn by_uniform_blocks(self, block_size: usize) -> UniformBlocks<Self>
fn by_uniform_blocks(self, block_size: usize) -> UniformBlocks<Self>
Divides an iterator into sequential blocks of the given size. Read more
sourcefn collect_into_vec(self, target: &mut Vec<Self::Item>)
fn collect_into_vec(self, target: &mut Vec<Self::Item>)
Collects the results of the iterator into the specified
vector. The vector is always cleared before execution
begins. If possible, reusing the vector across calls can lead
to better performance since it reuses the same backing buffer. Read more
sourcefn unzip_into_vecs<A, B>(self, left: &mut Vec<A>, right: &mut Vec<B>)where
Self: IndexedParallelIterator<Item = (A, B)>,
A: Send,
B: Send,
fn unzip_into_vecs<A, B>(self, left: &mut Vec<A>, right: &mut Vec<B>)where
Self: IndexedParallelIterator<Item = (A, B)>,
A: Send,
B: Send,
Unzips the results of the iterator into the specified
vectors. The vectors are always cleared before execution
begins. If possible, reusing the vectors across calls can lead
to better performance since they reuse the same backing buffer. Read more
sourcefn zip<Z>(self, zip_op: Z) -> Zip<Self, Z::Iter>where
Z: IntoParallelIterator,
Z::Iter: IndexedParallelIterator,
fn zip<Z>(self, zip_op: Z) -> Zip<Self, Z::Iter>where
Z: IntoParallelIterator,
Z::Iter: IndexedParallelIterator,
Iterates over tuples
(A, B)
, where the items A
are from
this iterator and B
are from the iterator given as argument.
Like the zip
method on ordinary iterators, if the two
iterators are of unequal length, you only get the items they
have in common. Read moresourcefn zip_eq<Z>(self, zip_op: Z) -> ZipEq<Self, Z::Iter>where
Z: IntoParallelIterator,
Z::Iter: IndexedParallelIterator,
fn zip_eq<Z>(self, zip_op: Z) -> ZipEq<Self, Z::Iter>where
Z: IntoParallelIterator,
Z::Iter: IndexedParallelIterator,
The same as
Zip
, but requires that both iterators have the same length. Read moresourcefn interleave<I>(self, other: I) -> Interleave<Self, I::Iter>where
I: IntoParallelIterator<Item = Self::Item>,
I::Iter: IndexedParallelIterator<Item = Self::Item>,
fn interleave<I>(self, other: I) -> Interleave<Self, I::Iter>where
I: IntoParallelIterator<Item = Self::Item>,
I::Iter: IndexedParallelIterator<Item = Self::Item>,
Interleaves elements of this iterator and the other given
iterator. Alternately yields elements from this iterator and
the given iterator, until both are exhausted. If one iterator
is exhausted before the other, the last elements are provided
from the other. Read more
sourcefn interleave_shortest<I>(self, other: I) -> InterleaveShortest<Self, I::Iter>where
I: IntoParallelIterator<Item = Self::Item>,
I::Iter: IndexedParallelIterator<Item = Self::Item>,
fn interleave_shortest<I>(self, other: I) -> InterleaveShortest<Self, I::Iter>where
I: IntoParallelIterator<Item = Self::Item>,
I::Iter: IndexedParallelIterator<Item = Self::Item>,
Interleaves elements of this iterator and the other given
iterator, until one is exhausted. Read more
sourcefn chunks(self, chunk_size: usize) -> Chunks<Self>
fn chunks(self, chunk_size: usize) -> Chunks<Self>
Splits an iterator up into fixed-size chunks. Read more
sourcefn fold_chunks<T, ID, F>(
self,
chunk_size: usize,
identity: ID,
fold_op: F
) -> FoldChunks<Self, ID, F>where
ID: Fn() -> T + Send + Sync,
F: Fn(T, Self::Item) -> T + Send + Sync,
T: Send,
fn fold_chunks<T, ID, F>(
self,
chunk_size: usize,
identity: ID,
fold_op: F
) -> FoldChunks<Self, ID, F>where
ID: Fn() -> T + Send + Sync,
F: Fn(T, Self::Item) -> T + Send + Sync,
T: Send,
sourcefn fold_chunks_with<T, F>(
self,
chunk_size: usize,
init: T,
fold_op: F
) -> FoldChunksWith<Self, T, F>where
T: Send + Clone,
F: Fn(T, Self::Item) -> T + Send + Sync,
fn fold_chunks_with<T, F>(
self,
chunk_size: usize,
init: T,
fold_op: F
) -> FoldChunksWith<Self, T, F>where
T: Send + Clone,
F: Fn(T, Self::Item) -> T + Send + Sync,
sourcefn partial_cmp<I>(self, other: I) -> Option<Ordering>where
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
fn partial_cmp<I>(self, other: I) -> Option<Ordering>where
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
Lexicographically compares the elements of this
ParallelIterator
with those of
another. Read moresourcefn eq<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialEq<I::Item>,
fn eq<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialEq<I::Item>,
Determines if the elements of this
ParallelIterator
are equal to those of another Read moresourcefn ne<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialEq<I::Item>,
fn ne<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialEq<I::Item>,
Determines if the elements of this
ParallelIterator
are unequal to those of another Read moresourcefn lt<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
fn lt<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
Determines if the elements of this
ParallelIterator
are lexicographically less than those of another. Read moresourcefn le<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
fn le<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
Determines if the elements of this
ParallelIterator
are less or equal to those of another. Read moresourcefn gt<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
fn gt<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
Determines if the elements of this
ParallelIterator
are lexicographically greater than those of another. Read moresourcefn ge<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
fn ge<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
Determines if the elements of this
ParallelIterator
are less or equal to those of another. Read moresourcefn step_by(self, step: usize) -> StepBy<Self>
fn step_by(self, step: usize) -> StepBy<Self>
Creates an iterator that steps by the given amount Read more
sourcefn skip(self, n: usize) -> Skip<Self>
fn skip(self, n: usize) -> Skip<Self>
Creates an iterator that skips the first
n
elements. Read moresourcefn take(self, n: usize) -> Take<Self>
fn take(self, n: usize) -> Take<Self>
Creates an iterator that yields the first
n
elements. Read moresourcefn position_any<P>(self, predicate: P) -> Option<usize>where
P: Fn(Self::Item) -> bool + Sync + Send,
fn position_any<P>(self, predicate: P) -> Option<usize>where
P: Fn(Self::Item) -> bool + Sync + Send,
Searches for some item in the parallel iterator that
matches the given predicate, and returns its index. Like
ParallelIterator::find_any
, the parallel search will not
necessarily find the first match, and once a match is
found we’ll attempt to stop processing any more. Read moresourcefn position_first<P>(self, predicate: P) -> Option<usize>where
P: Fn(Self::Item) -> bool + Sync + Send,
fn position_first<P>(self, predicate: P) -> Option<usize>where
P: Fn(Self::Item) -> bool + Sync + Send,
Searches for the sequentially first item in the parallel iterator
that matches the given predicate, and returns its index. Read more
sourcefn position_last<P>(self, predicate: P) -> Option<usize>where
P: Fn(Self::Item) -> bool + Sync + Send,
fn position_last<P>(self, predicate: P) -> Option<usize>where
P: Fn(Self::Item) -> bool + Sync + Send,
Searches for the sequentially last item in the parallel iterator
that matches the given predicate, and returns its index. Read more
sourcefn positions<P>(self, predicate: P) -> Positions<Self, P>where
P: Fn(Self::Item) -> bool + Sync + Send,
fn positions<P>(self, predicate: P) -> Positions<Self, P>where
P: Fn(Self::Item) -> bool + Sync + Send,
Searches for items in the parallel iterator that match the given
predicate, and returns their indices. Read more
sourcefn rev(self) -> Rev<Self>
fn rev(self) -> Rev<Self>
Produces a new iterator with the elements of this iterator in
reverse order. Read more
sourcefn with_min_len(self, min: usize) -> MinLen<Self>
fn with_min_len(self, min: usize) -> MinLen<Self>
Sets the minimum length of iterators desired to process in each
rayon job. Rayon will not split any smaller than this length, but
of course an iterator could already be smaller to begin with. Read more
sourcefn with_max_len(self, max: usize) -> MaxLen<Self>
fn with_max_len(self, max: usize) -> MaxLen<Self>
Sets the maximum length of iterators desired to process in each
rayon job. Rayon will try to split at least below this length,
unless that would put it below the length from
with_min_len()
.
For example, given min=10 and max=15, a length of 16 will not be
split any further. Read moresourceimpl<A, B, C, D, E, F, G, H, I, J> IndexedParallelIterator for MultiZip<(A, B, C, D, E, F, G, H, I, J)>where
A: IndexedParallelIterator,
B: IndexedParallelIterator,
C: IndexedParallelIterator,
D: IndexedParallelIterator,
E: IndexedParallelIterator,
F: IndexedParallelIterator,
G: IndexedParallelIterator,
H: IndexedParallelIterator,
I: IndexedParallelIterator,
J: IndexedParallelIterator,
impl<A, B, C, D, E, F, G, H, I, J> IndexedParallelIterator for MultiZip<(A, B, C, D, E, F, G, H, I, J)>where
A: IndexedParallelIterator,
B: IndexedParallelIterator,
C: IndexedParallelIterator,
D: IndexedParallelIterator,
E: IndexedParallelIterator,
F: IndexedParallelIterator,
G: IndexedParallelIterator,
H: IndexedParallelIterator,
I: IndexedParallelIterator,
J: IndexedParallelIterator,
sourcefn drive<CONSUMER>(self, consumer: CONSUMER) -> CONSUMER::Resultwhere
CONSUMER: Consumer<Self::Item>,
fn drive<CONSUMER>(self, consumer: CONSUMER) -> CONSUMER::Resultwhere
CONSUMER: Consumer<Self::Item>,
Internal method used to define the behavior of this parallel
iterator. You should not need to call this directly. Read more
sourcefn len(&self) -> usize
fn len(&self) -> usize
Produces an exact count of how many items this iterator will
produce, presuming no panic occurs. Read more
sourcefn with_producer<CB>(self, callback: CB) -> CB::Outputwhere
CB: ProducerCallback<Self::Item>,
fn with_producer<CB>(self, callback: CB) -> CB::Outputwhere
CB: ProducerCallback<Self::Item>,
Internal method used to define the behavior of this parallel
iterator. You should not need to call this directly. Read more
sourcefn by_exponential_blocks(self) -> ExponentialBlocks<Self>
fn by_exponential_blocks(self) -> ExponentialBlocks<Self>
Divides an iterator into sequential blocks of exponentially-increasing size. Read more
sourcefn by_uniform_blocks(self, block_size: usize) -> UniformBlocks<Self>
fn by_uniform_blocks(self, block_size: usize) -> UniformBlocks<Self>
Divides an iterator into sequential blocks of the given size. Read more
sourcefn collect_into_vec(self, target: &mut Vec<Self::Item>)
fn collect_into_vec(self, target: &mut Vec<Self::Item>)
Collects the results of the iterator into the specified
vector. The vector is always cleared before execution
begins. If possible, reusing the vector across calls can lead
to better performance since it reuses the same backing buffer. Read more
sourcefn unzip_into_vecs<A, B>(self, left: &mut Vec<A>, right: &mut Vec<B>)where
Self: IndexedParallelIterator<Item = (A, B)>,
A: Send,
B: Send,
fn unzip_into_vecs<A, B>(self, left: &mut Vec<A>, right: &mut Vec<B>)where
Self: IndexedParallelIterator<Item = (A, B)>,
A: Send,
B: Send,
Unzips the results of the iterator into the specified
vectors. The vectors are always cleared before execution
begins. If possible, reusing the vectors across calls can lead
to better performance since they reuse the same backing buffer. Read more
sourcefn zip<Z>(self, zip_op: Z) -> Zip<Self, Z::Iter>where
Z: IntoParallelIterator,
Z::Iter: IndexedParallelIterator,
fn zip<Z>(self, zip_op: Z) -> Zip<Self, Z::Iter>where
Z: IntoParallelIterator,
Z::Iter: IndexedParallelIterator,
Iterates over tuples
(A, B)
, where the items A
are from
this iterator and B
are from the iterator given as argument.
Like the zip
method on ordinary iterators, if the two
iterators are of unequal length, you only get the items they
have in common. Read moresourcefn zip_eq<Z>(self, zip_op: Z) -> ZipEq<Self, Z::Iter>where
Z: IntoParallelIterator,
Z::Iter: IndexedParallelIterator,
fn zip_eq<Z>(self, zip_op: Z) -> ZipEq<Self, Z::Iter>where
Z: IntoParallelIterator,
Z::Iter: IndexedParallelIterator,
The same as
Zip
, but requires that both iterators have the same length. Read moresourcefn interleave<I>(self, other: I) -> Interleave<Self, I::Iter>where
I: IntoParallelIterator<Item = Self::Item>,
I::Iter: IndexedParallelIterator<Item = Self::Item>,
fn interleave<I>(self, other: I) -> Interleave<Self, I::Iter>where
I: IntoParallelIterator<Item = Self::Item>,
I::Iter: IndexedParallelIterator<Item = Self::Item>,
Interleaves elements of this iterator and the other given
iterator. Alternately yields elements from this iterator and
the given iterator, until both are exhausted. If one iterator
is exhausted before the other, the last elements are provided
from the other. Read more
sourcefn interleave_shortest<I>(self, other: I) -> InterleaveShortest<Self, I::Iter>where
I: IntoParallelIterator<Item = Self::Item>,
I::Iter: IndexedParallelIterator<Item = Self::Item>,
fn interleave_shortest<I>(self, other: I) -> InterleaveShortest<Self, I::Iter>where
I: IntoParallelIterator<Item = Self::Item>,
I::Iter: IndexedParallelIterator<Item = Self::Item>,
Interleaves elements of this iterator and the other given
iterator, until one is exhausted. Read more
sourcefn chunks(self, chunk_size: usize) -> Chunks<Self>
fn chunks(self, chunk_size: usize) -> Chunks<Self>
Splits an iterator up into fixed-size chunks. Read more
sourcefn fold_chunks<T, ID, F>(
self,
chunk_size: usize,
identity: ID,
fold_op: F
) -> FoldChunks<Self, ID, F>where
ID: Fn() -> T + Send + Sync,
F: Fn(T, Self::Item) -> T + Send + Sync,
T: Send,
fn fold_chunks<T, ID, F>(
self,
chunk_size: usize,
identity: ID,
fold_op: F
) -> FoldChunks<Self, ID, F>where
ID: Fn() -> T + Send + Sync,
F: Fn(T, Self::Item) -> T + Send + Sync,
T: Send,
sourcefn fold_chunks_with<T, F>(
self,
chunk_size: usize,
init: T,
fold_op: F
) -> FoldChunksWith<Self, T, F>where
T: Send + Clone,
F: Fn(T, Self::Item) -> T + Send + Sync,
fn fold_chunks_with<T, F>(
self,
chunk_size: usize,
init: T,
fold_op: F
) -> FoldChunksWith<Self, T, F>where
T: Send + Clone,
F: Fn(T, Self::Item) -> T + Send + Sync,
sourcefn partial_cmp<I>(self, other: I) -> Option<Ordering>where
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
fn partial_cmp<I>(self, other: I) -> Option<Ordering>where
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
Lexicographically compares the elements of this
ParallelIterator
with those of
another. Read moresourcefn eq<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialEq<I::Item>,
fn eq<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialEq<I::Item>,
Determines if the elements of this
ParallelIterator
are equal to those of another Read moresourcefn ne<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialEq<I::Item>,
fn ne<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialEq<I::Item>,
Determines if the elements of this
ParallelIterator
are unequal to those of another Read moresourcefn lt<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
fn lt<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
Determines if the elements of this
ParallelIterator
are lexicographically less than those of another. Read moresourcefn le<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
fn le<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
Determines if the elements of this
ParallelIterator
are less or equal to those of another. Read moresourcefn gt<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
fn gt<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
Determines if the elements of this
ParallelIterator
are lexicographically greater than those of another. Read moresourcefn ge<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
fn ge<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
Determines if the elements of this
ParallelIterator
are less or equal to those of another. Read moresourcefn step_by(self, step: usize) -> StepBy<Self>
fn step_by(self, step: usize) -> StepBy<Self>
Creates an iterator that steps by the given amount Read more
sourcefn skip(self, n: usize) -> Skip<Self>
fn skip(self, n: usize) -> Skip<Self>
Creates an iterator that skips the first
n
elements. Read moresourcefn take(self, n: usize) -> Take<Self>
fn take(self, n: usize) -> Take<Self>
Creates an iterator that yields the first
n
elements. Read moresourcefn position_any<P>(self, predicate: P) -> Option<usize>where
P: Fn(Self::Item) -> bool + Sync + Send,
fn position_any<P>(self, predicate: P) -> Option<usize>where
P: Fn(Self::Item) -> bool + Sync + Send,
Searches for some item in the parallel iterator that
matches the given predicate, and returns its index. Like
ParallelIterator::find_any
, the parallel search will not
necessarily find the first match, and once a match is
found we’ll attempt to stop processing any more. Read moresourcefn position_first<P>(self, predicate: P) -> Option<usize>where
P: Fn(Self::Item) -> bool + Sync + Send,
fn position_first<P>(self, predicate: P) -> Option<usize>where
P: Fn(Self::Item) -> bool + Sync + Send,
Searches for the sequentially first item in the parallel iterator
that matches the given predicate, and returns its index. Read more
sourcefn position_last<P>(self, predicate: P) -> Option<usize>where
P: Fn(Self::Item) -> bool + Sync + Send,
fn position_last<P>(self, predicate: P) -> Option<usize>where
P: Fn(Self::Item) -> bool + Sync + Send,
Searches for the sequentially last item in the parallel iterator
that matches the given predicate, and returns its index. Read more
sourcefn positions<P>(self, predicate: P) -> Positions<Self, P>where
P: Fn(Self::Item) -> bool + Sync + Send,
fn positions<P>(self, predicate: P) -> Positions<Self, P>where
P: Fn(Self::Item) -> bool + Sync + Send,
Searches for items in the parallel iterator that match the given
predicate, and returns their indices. Read more
sourcefn rev(self) -> Rev<Self>
fn rev(self) -> Rev<Self>
Produces a new iterator with the elements of this iterator in
reverse order. Read more
sourcefn with_min_len(self, min: usize) -> MinLen<Self>
fn with_min_len(self, min: usize) -> MinLen<Self>
Sets the minimum length of iterators desired to process in each
rayon job. Rayon will not split any smaller than this length, but
of course an iterator could already be smaller to begin with. Read more
sourcefn with_max_len(self, max: usize) -> MaxLen<Self>
fn with_max_len(self, max: usize) -> MaxLen<Self>
Sets the maximum length of iterators desired to process in each
rayon job. Rayon will try to split at least below this length,
unless that would put it below the length from
with_min_len()
.
For example, given min=10 and max=15, a length of 16 will not be
split any further. Read moresourceimpl<A, B, C, D, E, F, G, H, I> IndexedParallelIterator for MultiZip<(A, B, C, D, E, F, G, H, I)>where
A: IndexedParallelIterator,
B: IndexedParallelIterator,
C: IndexedParallelIterator,
D: IndexedParallelIterator,
E: IndexedParallelIterator,
F: IndexedParallelIterator,
G: IndexedParallelIterator,
H: IndexedParallelIterator,
I: IndexedParallelIterator,
impl<A, B, C, D, E, F, G, H, I> IndexedParallelIterator for MultiZip<(A, B, C, D, E, F, G, H, I)>where
A: IndexedParallelIterator,
B: IndexedParallelIterator,
C: IndexedParallelIterator,
D: IndexedParallelIterator,
E: IndexedParallelIterator,
F: IndexedParallelIterator,
G: IndexedParallelIterator,
H: IndexedParallelIterator,
I: IndexedParallelIterator,
sourcefn drive<CONSUMER>(self, consumer: CONSUMER) -> CONSUMER::Resultwhere
CONSUMER: Consumer<Self::Item>,
fn drive<CONSUMER>(self, consumer: CONSUMER) -> CONSUMER::Resultwhere
CONSUMER: Consumer<Self::Item>,
Internal method used to define the behavior of this parallel
iterator. You should not need to call this directly. Read more
sourcefn len(&self) -> usize
fn len(&self) -> usize
Produces an exact count of how many items this iterator will
produce, presuming no panic occurs. Read more
sourcefn with_producer<CB>(self, callback: CB) -> CB::Outputwhere
CB: ProducerCallback<Self::Item>,
fn with_producer<CB>(self, callback: CB) -> CB::Outputwhere
CB: ProducerCallback<Self::Item>,
Internal method used to define the behavior of this parallel
iterator. You should not need to call this directly. Read more
sourcefn by_exponential_blocks(self) -> ExponentialBlocks<Self>
fn by_exponential_blocks(self) -> ExponentialBlocks<Self>
Divides an iterator into sequential blocks of exponentially-increasing size. Read more
sourcefn by_uniform_blocks(self, block_size: usize) -> UniformBlocks<Self>
fn by_uniform_blocks(self, block_size: usize) -> UniformBlocks<Self>
Divides an iterator into sequential blocks of the given size. Read more
sourcefn collect_into_vec(self, target: &mut Vec<Self::Item>)
fn collect_into_vec(self, target: &mut Vec<Self::Item>)
Collects the results of the iterator into the specified
vector. The vector is always cleared before execution
begins. If possible, reusing the vector across calls can lead
to better performance since it reuses the same backing buffer. Read more
sourcefn unzip_into_vecs<A, B>(self, left: &mut Vec<A>, right: &mut Vec<B>)where
Self: IndexedParallelIterator<Item = (A, B)>,
A: Send,
B: Send,
fn unzip_into_vecs<A, B>(self, left: &mut Vec<A>, right: &mut Vec<B>)where
Self: IndexedParallelIterator<Item = (A, B)>,
A: Send,
B: Send,
Unzips the results of the iterator into the specified
vectors. The vectors are always cleared before execution
begins. If possible, reusing the vectors across calls can lead
to better performance since they reuse the same backing buffer. Read more
sourcefn zip<Z>(self, zip_op: Z) -> Zip<Self, Z::Iter>where
Z: IntoParallelIterator,
Z::Iter: IndexedParallelIterator,
fn zip<Z>(self, zip_op: Z) -> Zip<Self, Z::Iter>where
Z: IntoParallelIterator,
Z::Iter: IndexedParallelIterator,
Iterates over tuples
(A, B)
, where the items A
are from
this iterator and B
are from the iterator given as argument.
Like the zip
method on ordinary iterators, if the two
iterators are of unequal length, you only get the items they
have in common. Read moresourcefn zip_eq<Z>(self, zip_op: Z) -> ZipEq<Self, Z::Iter>where
Z: IntoParallelIterator,
Z::Iter: IndexedParallelIterator,
fn zip_eq<Z>(self, zip_op: Z) -> ZipEq<Self, Z::Iter>where
Z: IntoParallelIterator,
Z::Iter: IndexedParallelIterator,
The same as
Zip
, but requires that both iterators have the same length. Read moresourcefn interleave<I>(self, other: I) -> Interleave<Self, I::Iter>where
I: IntoParallelIterator<Item = Self::Item>,
I::Iter: IndexedParallelIterator<Item = Self::Item>,
fn interleave<I>(self, other: I) -> Interleave<Self, I::Iter>where
I: IntoParallelIterator<Item = Self::Item>,
I::Iter: IndexedParallelIterator<Item = Self::Item>,
Interleaves elements of this iterator and the other given
iterator. Alternately yields elements from this iterator and
the given iterator, until both are exhausted. If one iterator
is exhausted before the other, the last elements are provided
from the other. Read more
sourcefn interleave_shortest<I>(self, other: I) -> InterleaveShortest<Self, I::Iter>where
I: IntoParallelIterator<Item = Self::Item>,
I::Iter: IndexedParallelIterator<Item = Self::Item>,
fn interleave_shortest<I>(self, other: I) -> InterleaveShortest<Self, I::Iter>where
I: IntoParallelIterator<Item = Self::Item>,
I::Iter: IndexedParallelIterator<Item = Self::Item>,
Interleaves elements of this iterator and the other given
iterator, until one is exhausted. Read more
sourcefn chunks(self, chunk_size: usize) -> Chunks<Self>
fn chunks(self, chunk_size: usize) -> Chunks<Self>
Splits an iterator up into fixed-size chunks. Read more
sourcefn fold_chunks<T, ID, F>(
self,
chunk_size: usize,
identity: ID,
fold_op: F
) -> FoldChunks<Self, ID, F>where
ID: Fn() -> T + Send + Sync,
F: Fn(T, Self::Item) -> T + Send + Sync,
T: Send,
fn fold_chunks<T, ID, F>(
self,
chunk_size: usize,
identity: ID,
fold_op: F
) -> FoldChunks<Self, ID, F>where
ID: Fn() -> T + Send + Sync,
F: Fn(T, Self::Item) -> T + Send + Sync,
T: Send,
sourcefn fold_chunks_with<T, F>(
self,
chunk_size: usize,
init: T,
fold_op: F
) -> FoldChunksWith<Self, T, F>where
T: Send + Clone,
F: Fn(T, Self::Item) -> T + Send + Sync,
fn fold_chunks_with<T, F>(
self,
chunk_size: usize,
init: T,
fold_op: F
) -> FoldChunksWith<Self, T, F>where
T: Send + Clone,
F: Fn(T, Self::Item) -> T + Send + Sync,
sourcefn partial_cmp<I>(self, other: I) -> Option<Ordering>where
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
fn partial_cmp<I>(self, other: I) -> Option<Ordering>where
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
Lexicographically compares the elements of this
ParallelIterator
with those of
another. Read moresourcefn eq<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialEq<I::Item>,
fn eq<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialEq<I::Item>,
Determines if the elements of this
ParallelIterator
are equal to those of another Read moresourcefn ne<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialEq<I::Item>,
fn ne<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialEq<I::Item>,
Determines if the elements of this
ParallelIterator
are unequal to those of another Read moresourcefn lt<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
fn lt<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
Determines if the elements of this
ParallelIterator
are lexicographically less than those of another. Read moresourcefn le<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
fn le<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
Determines if the elements of this
ParallelIterator
are less or equal to those of another. Read moresourcefn gt<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
fn gt<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
Determines if the elements of this
ParallelIterator
are lexicographically greater than those of another. Read moresourcefn ge<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
fn ge<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
Determines if the elements of this
ParallelIterator
are less or equal to those of another. Read moresourcefn step_by(self, step: usize) -> StepBy<Self>
fn step_by(self, step: usize) -> StepBy<Self>
Creates an iterator that steps by the given amount Read more
sourcefn skip(self, n: usize) -> Skip<Self>
fn skip(self, n: usize) -> Skip<Self>
Creates an iterator that skips the first
n
elements. Read moresourcefn take(self, n: usize) -> Take<Self>
fn take(self, n: usize) -> Take<Self>
Creates an iterator that yields the first
n
elements. Read moresourcefn position_any<P>(self, predicate: P) -> Option<usize>where
P: Fn(Self::Item) -> bool + Sync + Send,
fn position_any<P>(self, predicate: P) -> Option<usize>where
P: Fn(Self::Item) -> bool + Sync + Send,
Searches for some item in the parallel iterator that
matches the given predicate, and returns its index. Like
ParallelIterator::find_any
, the parallel search will not
necessarily find the first match, and once a match is
found we’ll attempt to stop processing any more. Read moresourcefn position_first<P>(self, predicate: P) -> Option<usize>where
P: Fn(Self::Item) -> bool + Sync + Send,
fn position_first<P>(self, predicate: P) -> Option<usize>where
P: Fn(Self::Item) -> bool + Sync + Send,
Searches for the sequentially first item in the parallel iterator
that matches the given predicate, and returns its index. Read more
sourcefn position_last<P>(self, predicate: P) -> Option<usize>where
P: Fn(Self::Item) -> bool + Sync + Send,
fn position_last<P>(self, predicate: P) -> Option<usize>where
P: Fn(Self::Item) -> bool + Sync + Send,
Searches for the sequentially last item in the parallel iterator
that matches the given predicate, and returns its index. Read more
sourcefn positions<P>(self, predicate: P) -> Positions<Self, P>where
P: Fn(Self::Item) -> bool + Sync + Send,
fn positions<P>(self, predicate: P) -> Positions<Self, P>where
P: Fn(Self::Item) -> bool + Sync + Send,
Searches for items in the parallel iterator that match the given
predicate, and returns their indices. Read more
sourcefn rev(self) -> Rev<Self>
fn rev(self) -> Rev<Self>
Produces a new iterator with the elements of this iterator in
reverse order. Read more
sourcefn with_min_len(self, min: usize) -> MinLen<Self>
fn with_min_len(self, min: usize) -> MinLen<Self>
Sets the minimum length of iterators desired to process in each
rayon job. Rayon will not split any smaller than this length, but
of course an iterator could already be smaller to begin with. Read more
sourcefn with_max_len(self, max: usize) -> MaxLen<Self>
fn with_max_len(self, max: usize) -> MaxLen<Self>
Sets the maximum length of iterators desired to process in each
rayon job. Rayon will try to split at least below this length,
unless that would put it below the length from
with_min_len()
.
For example, given min=10 and max=15, a length of 16 will not be
split any further. Read moresourceimpl<A, B, C, D, E, F, G, H> IndexedParallelIterator for MultiZip<(A, B, C, D, E, F, G, H)>where
A: IndexedParallelIterator,
B: IndexedParallelIterator,
C: IndexedParallelIterator,
D: IndexedParallelIterator,
E: IndexedParallelIterator,
F: IndexedParallelIterator,
G: IndexedParallelIterator,
H: IndexedParallelIterator,
impl<A, B, C, D, E, F, G, H> IndexedParallelIterator for MultiZip<(A, B, C, D, E, F, G, H)>where
A: IndexedParallelIterator,
B: IndexedParallelIterator,
C: IndexedParallelIterator,
D: IndexedParallelIterator,
E: IndexedParallelIterator,
F: IndexedParallelIterator,
G: IndexedParallelIterator,
H: IndexedParallelIterator,
sourcefn drive<CONSUMER>(self, consumer: CONSUMER) -> CONSUMER::Resultwhere
CONSUMER: Consumer<Self::Item>,
fn drive<CONSUMER>(self, consumer: CONSUMER) -> CONSUMER::Resultwhere
CONSUMER: Consumer<Self::Item>,
Internal method used to define the behavior of this parallel
iterator. You should not need to call this directly. Read more
sourcefn len(&self) -> usize
fn len(&self) -> usize
Produces an exact count of how many items this iterator will
produce, presuming no panic occurs. Read more
sourcefn with_producer<CB>(self, callback: CB) -> CB::Outputwhere
CB: ProducerCallback<Self::Item>,
fn with_producer<CB>(self, callback: CB) -> CB::Outputwhere
CB: ProducerCallback<Self::Item>,
Internal method used to define the behavior of this parallel
iterator. You should not need to call this directly. Read more
sourcefn by_exponential_blocks(self) -> ExponentialBlocks<Self>
fn by_exponential_blocks(self) -> ExponentialBlocks<Self>
Divides an iterator into sequential blocks of exponentially-increasing size. Read more
sourcefn by_uniform_blocks(self, block_size: usize) -> UniformBlocks<Self>
fn by_uniform_blocks(self, block_size: usize) -> UniformBlocks<Self>
Divides an iterator into sequential blocks of the given size. Read more
sourcefn collect_into_vec(self, target: &mut Vec<Self::Item>)
fn collect_into_vec(self, target: &mut Vec<Self::Item>)
Collects the results of the iterator into the specified
vector. The vector is always cleared before execution
begins. If possible, reusing the vector across calls can lead
to better performance since it reuses the same backing buffer. Read more
sourcefn unzip_into_vecs<A, B>(self, left: &mut Vec<A>, right: &mut Vec<B>)where
Self: IndexedParallelIterator<Item = (A, B)>,
A: Send,
B: Send,
fn unzip_into_vecs<A, B>(self, left: &mut Vec<A>, right: &mut Vec<B>)where
Self: IndexedParallelIterator<Item = (A, B)>,
A: Send,
B: Send,
Unzips the results of the iterator into the specified
vectors. The vectors are always cleared before execution
begins. If possible, reusing the vectors across calls can lead
to better performance since they reuse the same backing buffer. Read more
sourcefn zip<Z>(self, zip_op: Z) -> Zip<Self, Z::Iter>where
Z: IntoParallelIterator,
Z::Iter: IndexedParallelIterator,
fn zip<Z>(self, zip_op: Z) -> Zip<Self, Z::Iter>where
Z: IntoParallelIterator,
Z::Iter: IndexedParallelIterator,
Iterates over tuples
(A, B)
, where the items A
are from
this iterator and B
are from the iterator given as argument.
Like the zip
method on ordinary iterators, if the two
iterators are of unequal length, you only get the items they
have in common. Read moresourcefn zip_eq<Z>(self, zip_op: Z) -> ZipEq<Self, Z::Iter>where
Z: IntoParallelIterator,
Z::Iter: IndexedParallelIterator,
fn zip_eq<Z>(self, zip_op: Z) -> ZipEq<Self, Z::Iter>where
Z: IntoParallelIterator,
Z::Iter: IndexedParallelIterator,
The same as
Zip
, but requires that both iterators have the same length. Read moresourcefn interleave<I>(self, other: I) -> Interleave<Self, I::Iter>where
I: IntoParallelIterator<Item = Self::Item>,
I::Iter: IndexedParallelIterator<Item = Self::Item>,
fn interleave<I>(self, other: I) -> Interleave<Self, I::Iter>where
I: IntoParallelIterator<Item = Self::Item>,
I::Iter: IndexedParallelIterator<Item = Self::Item>,
Interleaves elements of this iterator and the other given
iterator. Alternately yields elements from this iterator and
the given iterator, until both are exhausted. If one iterator
is exhausted before the other, the last elements are provided
from the other. Read more
sourcefn interleave_shortest<I>(self, other: I) -> InterleaveShortest<Self, I::Iter>where
I: IntoParallelIterator<Item = Self::Item>,
I::Iter: IndexedParallelIterator<Item = Self::Item>,
fn interleave_shortest<I>(self, other: I) -> InterleaveShortest<Self, I::Iter>where
I: IntoParallelIterator<Item = Self::Item>,
I::Iter: IndexedParallelIterator<Item = Self::Item>,
Interleaves elements of this iterator and the other given
iterator, until one is exhausted. Read more
sourcefn chunks(self, chunk_size: usize) -> Chunks<Self>
fn chunks(self, chunk_size: usize) -> Chunks<Self>
Splits an iterator up into fixed-size chunks. Read more
sourcefn fold_chunks<T, ID, F>(
self,
chunk_size: usize,
identity: ID,
fold_op: F
) -> FoldChunks<Self, ID, F>where
ID: Fn() -> T + Send + Sync,
F: Fn(T, Self::Item) -> T + Send + Sync,
T: Send,
fn fold_chunks<T, ID, F>(
self,
chunk_size: usize,
identity: ID,
fold_op: F
) -> FoldChunks<Self, ID, F>where
ID: Fn() -> T + Send + Sync,
F: Fn(T, Self::Item) -> T + Send + Sync,
T: Send,
sourcefn fold_chunks_with<T, F>(
self,
chunk_size: usize,
init: T,
fold_op: F
) -> FoldChunksWith<Self, T, F>where
T: Send + Clone,
F: Fn(T, Self::Item) -> T + Send + Sync,
fn fold_chunks_with<T, F>(
self,
chunk_size: usize,
init: T,
fold_op: F
) -> FoldChunksWith<Self, T, F>where
T: Send + Clone,
F: Fn(T, Self::Item) -> T + Send + Sync,
sourcefn partial_cmp<I>(self, other: I) -> Option<Ordering>where
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
fn partial_cmp<I>(self, other: I) -> Option<Ordering>where
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
Lexicographically compares the elements of this
ParallelIterator
with those of
another. Read moresourcefn eq<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialEq<I::Item>,
fn eq<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialEq<I::Item>,
Determines if the elements of this
ParallelIterator
are equal to those of another Read moresourcefn ne<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialEq<I::Item>,
fn ne<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialEq<I::Item>,
Determines if the elements of this
ParallelIterator
are unequal to those of another Read moresourcefn lt<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
fn lt<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
Determines if the elements of this
ParallelIterator
are lexicographically less than those of another. Read moresourcefn le<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
fn le<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
Determines if the elements of this
ParallelIterator
are less or equal to those of another. Read moresourcefn gt<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
fn gt<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
Determines if the elements of this
ParallelIterator
are lexicographically greater than those of another. Read moresourcefn ge<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
fn ge<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
Determines if the elements of this
ParallelIterator
are less or equal to those of another. Read moresourcefn step_by(self, step: usize) -> StepBy<Self>
fn step_by(self, step: usize) -> StepBy<Self>
Creates an iterator that steps by the given amount Read more
sourcefn skip(self, n: usize) -> Skip<Self>
fn skip(self, n: usize) -> Skip<Self>
Creates an iterator that skips the first
n
elements. Read moresourcefn take(self, n: usize) -> Take<Self>
fn take(self, n: usize) -> Take<Self>
Creates an iterator that yields the first
n
elements. Read moresourcefn position_any<P>(self, predicate: P) -> Option<usize>where
P: Fn(Self::Item) -> bool + Sync + Send,
fn position_any<P>(self, predicate: P) -> Option<usize>where
P: Fn(Self::Item) -> bool + Sync + Send,
Searches for some item in the parallel iterator that
matches the given predicate, and returns its index. Like
ParallelIterator::find_any
, the parallel search will not
necessarily find the first match, and once a match is
found we’ll attempt to stop processing any more. Read moresourcefn position_first<P>(self, predicate: P) -> Option<usize>where
P: Fn(Self::Item) -> bool + Sync + Send,
fn position_first<P>(self, predicate: P) -> Option<usize>where
P: Fn(Self::Item) -> bool + Sync + Send,
Searches for the sequentially first item in the parallel iterator
that matches the given predicate, and returns its index. Read more
sourcefn position_last<P>(self, predicate: P) -> Option<usize>where
P: Fn(Self::Item) -> bool + Sync + Send,
fn position_last<P>(self, predicate: P) -> Option<usize>where
P: Fn(Self::Item) -> bool + Sync + Send,
Searches for the sequentially last item in the parallel iterator
that matches the given predicate, and returns its index. Read more
sourcefn positions<P>(self, predicate: P) -> Positions<Self, P>where
P: Fn(Self::Item) -> bool + Sync + Send,
fn positions<P>(self, predicate: P) -> Positions<Self, P>where
P: Fn(Self::Item) -> bool + Sync + Send,
Searches for items in the parallel iterator that match the given
predicate, and returns their indices. Read more
sourcefn rev(self) -> Rev<Self>
fn rev(self) -> Rev<Self>
Produces a new iterator with the elements of this iterator in
reverse order. Read more
sourcefn with_min_len(self, min: usize) -> MinLen<Self>
fn with_min_len(self, min: usize) -> MinLen<Self>
Sets the minimum length of iterators desired to process in each
rayon job. Rayon will not split any smaller than this length, but
of course an iterator could already be smaller to begin with. Read more
sourcefn with_max_len(self, max: usize) -> MaxLen<Self>
fn with_max_len(self, max: usize) -> MaxLen<Self>
Sets the maximum length of iterators desired to process in each
rayon job. Rayon will try to split at least below this length,
unless that would put it below the length from
with_min_len()
.
For example, given min=10 and max=15, a length of 16 will not be
split any further. Read moresourceimpl<A, B, C, D, E, F, G> IndexedParallelIterator for MultiZip<(A, B, C, D, E, F, G)>where
A: IndexedParallelIterator,
B: IndexedParallelIterator,
C: IndexedParallelIterator,
D: IndexedParallelIterator,
E: IndexedParallelIterator,
F: IndexedParallelIterator,
G: IndexedParallelIterator,
impl<A, B, C, D, E, F, G> IndexedParallelIterator for MultiZip<(A, B, C, D, E, F, G)>where
A: IndexedParallelIterator,
B: IndexedParallelIterator,
C: IndexedParallelIterator,
D: IndexedParallelIterator,
E: IndexedParallelIterator,
F: IndexedParallelIterator,
G: IndexedParallelIterator,
sourcefn drive<CONSUMER>(self, consumer: CONSUMER) -> CONSUMER::Resultwhere
CONSUMER: Consumer<Self::Item>,
fn drive<CONSUMER>(self, consumer: CONSUMER) -> CONSUMER::Resultwhere
CONSUMER: Consumer<Self::Item>,
Internal method used to define the behavior of this parallel
iterator. You should not need to call this directly. Read more
sourcefn len(&self) -> usize
fn len(&self) -> usize
Produces an exact count of how many items this iterator will
produce, presuming no panic occurs. Read more
sourcefn with_producer<CB>(self, callback: CB) -> CB::Outputwhere
CB: ProducerCallback<Self::Item>,
fn with_producer<CB>(self, callback: CB) -> CB::Outputwhere
CB: ProducerCallback<Self::Item>,
Internal method used to define the behavior of this parallel
iterator. You should not need to call this directly. Read more
sourcefn by_exponential_blocks(self) -> ExponentialBlocks<Self>
fn by_exponential_blocks(self) -> ExponentialBlocks<Self>
Divides an iterator into sequential blocks of exponentially-increasing size. Read more
sourcefn by_uniform_blocks(self, block_size: usize) -> UniformBlocks<Self>
fn by_uniform_blocks(self, block_size: usize) -> UniformBlocks<Self>
Divides an iterator into sequential blocks of the given size. Read more
sourcefn collect_into_vec(self, target: &mut Vec<Self::Item>)
fn collect_into_vec(self, target: &mut Vec<Self::Item>)
Collects the results of the iterator into the specified
vector. The vector is always cleared before execution
begins. If possible, reusing the vector across calls can lead
to better performance since it reuses the same backing buffer. Read more
sourcefn unzip_into_vecs<A, B>(self, left: &mut Vec<A>, right: &mut Vec<B>)where
Self: IndexedParallelIterator<Item = (A, B)>,
A: Send,
B: Send,
fn unzip_into_vecs<A, B>(self, left: &mut Vec<A>, right: &mut Vec<B>)where
Self: IndexedParallelIterator<Item = (A, B)>,
A: Send,
B: Send,
Unzips the results of the iterator into the specified
vectors. The vectors are always cleared before execution
begins. If possible, reusing the vectors across calls can lead
to better performance since they reuse the same backing buffer. Read more
sourcefn zip<Z>(self, zip_op: Z) -> Zip<Self, Z::Iter>where
Z: IntoParallelIterator,
Z::Iter: IndexedParallelIterator,
fn zip<Z>(self, zip_op: Z) -> Zip<Self, Z::Iter>where
Z: IntoParallelIterator,
Z::Iter: IndexedParallelIterator,
Iterates over tuples
(A, B)
, where the items A
are from
this iterator and B
are from the iterator given as argument.
Like the zip
method on ordinary iterators, if the two
iterators are of unequal length, you only get the items they
have in common. Read moresourcefn zip_eq<Z>(self, zip_op: Z) -> ZipEq<Self, Z::Iter>where
Z: IntoParallelIterator,
Z::Iter: IndexedParallelIterator,
fn zip_eq<Z>(self, zip_op: Z) -> ZipEq<Self, Z::Iter>where
Z: IntoParallelIterator,
Z::Iter: IndexedParallelIterator,
The same as
Zip
, but requires that both iterators have the same length. Read moresourcefn interleave<I>(self, other: I) -> Interleave<Self, I::Iter>where
I: IntoParallelIterator<Item = Self::Item>,
I::Iter: IndexedParallelIterator<Item = Self::Item>,
fn interleave<I>(self, other: I) -> Interleave<Self, I::Iter>where
I: IntoParallelIterator<Item = Self::Item>,
I::Iter: IndexedParallelIterator<Item = Self::Item>,
Interleaves elements of this iterator and the other given
iterator. Alternately yields elements from this iterator and
the given iterator, until both are exhausted. If one iterator
is exhausted before the other, the last elements are provided
from the other. Read more
sourcefn interleave_shortest<I>(self, other: I) -> InterleaveShortest<Self, I::Iter>where
I: IntoParallelIterator<Item = Self::Item>,
I::Iter: IndexedParallelIterator<Item = Self::Item>,
fn interleave_shortest<I>(self, other: I) -> InterleaveShortest<Self, I::Iter>where
I: IntoParallelIterator<Item = Self::Item>,
I::Iter: IndexedParallelIterator<Item = Self::Item>,
Interleaves elements of this iterator and the other given
iterator, until one is exhausted. Read more
sourcefn chunks(self, chunk_size: usize) -> Chunks<Self>
fn chunks(self, chunk_size: usize) -> Chunks<Self>
Splits an iterator up into fixed-size chunks. Read more
sourcefn fold_chunks<T, ID, F>(
self,
chunk_size: usize,
identity: ID,
fold_op: F
) -> FoldChunks<Self, ID, F>where
ID: Fn() -> T + Send + Sync,
F: Fn(T, Self::Item) -> T + Send + Sync,
T: Send,
fn fold_chunks<T, ID, F>(
self,
chunk_size: usize,
identity: ID,
fold_op: F
) -> FoldChunks<Self, ID, F>where
ID: Fn() -> T + Send + Sync,
F: Fn(T, Self::Item) -> T + Send + Sync,
T: Send,
sourcefn fold_chunks_with<T, F>(
self,
chunk_size: usize,
init: T,
fold_op: F
) -> FoldChunksWith<Self, T, F>where
T: Send + Clone,
F: Fn(T, Self::Item) -> T + Send + Sync,
fn fold_chunks_with<T, F>(
self,
chunk_size: usize,
init: T,
fold_op: F
) -> FoldChunksWith<Self, T, F>where
T: Send + Clone,
F: Fn(T, Self::Item) -> T + Send + Sync,
sourcefn partial_cmp<I>(self, other: I) -> Option<Ordering>where
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
fn partial_cmp<I>(self, other: I) -> Option<Ordering>where
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
Lexicographically compares the elements of this
ParallelIterator
with those of
another. Read moresourcefn eq<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialEq<I::Item>,
fn eq<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialEq<I::Item>,
Determines if the elements of this
ParallelIterator
are equal to those of another Read moresourcefn ne<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialEq<I::Item>,
fn ne<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialEq<I::Item>,
Determines if the elements of this
ParallelIterator
are unequal to those of another Read moresourcefn lt<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
fn lt<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
Determines if the elements of this
ParallelIterator
are lexicographically less than those of another. Read moresourcefn le<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
fn le<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
Determines if the elements of this
ParallelIterator
are less or equal to those of another. Read moresourcefn gt<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
fn gt<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
Determines if the elements of this
ParallelIterator
are lexicographically greater than those of another. Read moresourcefn ge<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
fn ge<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
Determines if the elements of this
ParallelIterator
are less or equal to those of another. Read moresourcefn step_by(self, step: usize) -> StepBy<Self>
fn step_by(self, step: usize) -> StepBy<Self>
Creates an iterator that steps by the given amount Read more
sourcefn skip(self, n: usize) -> Skip<Self>
fn skip(self, n: usize) -> Skip<Self>
Creates an iterator that skips the first
n
elements. Read moresourcefn take(self, n: usize) -> Take<Self>
fn take(self, n: usize) -> Take<Self>
Creates an iterator that yields the first
n
elements. Read moresourcefn position_any<P>(self, predicate: P) -> Option<usize>where
P: Fn(Self::Item) -> bool + Sync + Send,
fn position_any<P>(self, predicate: P) -> Option<usize>where
P: Fn(Self::Item) -> bool + Sync + Send,
Searches for some item in the parallel iterator that
matches the given predicate, and returns its index. Like
ParallelIterator::find_any
, the parallel search will not
necessarily find the first match, and once a match is
found we’ll attempt to stop processing any more. Read moresourcefn position_first<P>(self, predicate: P) -> Option<usize>where
P: Fn(Self::Item) -> bool + Sync + Send,
fn position_first<P>(self, predicate: P) -> Option<usize>where
P: Fn(Self::Item) -> bool + Sync + Send,
Searches for the sequentially first item in the parallel iterator
that matches the given predicate, and returns its index. Read more
sourcefn position_last<P>(self, predicate: P) -> Option<usize>where
P: Fn(Self::Item) -> bool + Sync + Send,
fn position_last<P>(self, predicate: P) -> Option<usize>where
P: Fn(Self::Item) -> bool + Sync + Send,
Searches for the sequentially last item in the parallel iterator
that matches the given predicate, and returns its index. Read more
sourcefn positions<P>(self, predicate: P) -> Positions<Self, P>where
P: Fn(Self::Item) -> bool + Sync + Send,
fn positions<P>(self, predicate: P) -> Positions<Self, P>where
P: Fn(Self::Item) -> bool + Sync + Send,
Searches for items in the parallel iterator that match the given
predicate, and returns their indices. Read more
sourcefn rev(self) -> Rev<Self>
fn rev(self) -> Rev<Self>
Produces a new iterator with the elements of this iterator in
reverse order. Read more
sourcefn with_min_len(self, min: usize) -> MinLen<Self>
fn with_min_len(self, min: usize) -> MinLen<Self>
Sets the minimum length of iterators desired to process in each
rayon job. Rayon will not split any smaller than this length, but
of course an iterator could already be smaller to begin with. Read more
sourcefn with_max_len(self, max: usize) -> MaxLen<Self>
fn with_max_len(self, max: usize) -> MaxLen<Self>
Sets the maximum length of iterators desired to process in each
rayon job. Rayon will try to split at least below this length,
unless that would put it below the length from
with_min_len()
.
For example, given min=10 and max=15, a length of 16 will not be
split any further. Read moresourceimpl<A, B, C, D, E, F> IndexedParallelIterator for MultiZip<(A, B, C, D, E, F)>where
A: IndexedParallelIterator,
B: IndexedParallelIterator,
C: IndexedParallelIterator,
D: IndexedParallelIterator,
E: IndexedParallelIterator,
F: IndexedParallelIterator,
impl<A, B, C, D, E, F> IndexedParallelIterator for MultiZip<(A, B, C, D, E, F)>where
A: IndexedParallelIterator,
B: IndexedParallelIterator,
C: IndexedParallelIterator,
D: IndexedParallelIterator,
E: IndexedParallelIterator,
F: IndexedParallelIterator,
sourcefn drive<CONSUMER>(self, consumer: CONSUMER) -> CONSUMER::Resultwhere
CONSUMER: Consumer<Self::Item>,
fn drive<CONSUMER>(self, consumer: CONSUMER) -> CONSUMER::Resultwhere
CONSUMER: Consumer<Self::Item>,
Internal method used to define the behavior of this parallel
iterator. You should not need to call this directly. Read more
sourcefn len(&self) -> usize
fn len(&self) -> usize
Produces an exact count of how many items this iterator will
produce, presuming no panic occurs. Read more
sourcefn with_producer<CB>(self, callback: CB) -> CB::Outputwhere
CB: ProducerCallback<Self::Item>,
fn with_producer<CB>(self, callback: CB) -> CB::Outputwhere
CB: ProducerCallback<Self::Item>,
Internal method used to define the behavior of this parallel
iterator. You should not need to call this directly. Read more
sourcefn by_exponential_blocks(self) -> ExponentialBlocks<Self>
fn by_exponential_blocks(self) -> ExponentialBlocks<Self>
Divides an iterator into sequential blocks of exponentially-increasing size. Read more
sourcefn by_uniform_blocks(self, block_size: usize) -> UniformBlocks<Self>
fn by_uniform_blocks(self, block_size: usize) -> UniformBlocks<Self>
Divides an iterator into sequential blocks of the given size. Read more
sourcefn collect_into_vec(self, target: &mut Vec<Self::Item>)
fn collect_into_vec(self, target: &mut Vec<Self::Item>)
Collects the results of the iterator into the specified
vector. The vector is always cleared before execution
begins. If possible, reusing the vector across calls can lead
to better performance since it reuses the same backing buffer. Read more
sourcefn unzip_into_vecs<A, B>(self, left: &mut Vec<A>, right: &mut Vec<B>)where
Self: IndexedParallelIterator<Item = (A, B)>,
A: Send,
B: Send,
fn unzip_into_vecs<A, B>(self, left: &mut Vec<A>, right: &mut Vec<B>)where
Self: IndexedParallelIterator<Item = (A, B)>,
A: Send,
B: Send,
Unzips the results of the iterator into the specified
vectors. The vectors are always cleared before execution
begins. If possible, reusing the vectors across calls can lead
to better performance since they reuse the same backing buffer. Read more
sourcefn zip<Z>(self, zip_op: Z) -> Zip<Self, Z::Iter>where
Z: IntoParallelIterator,
Z::Iter: IndexedParallelIterator,
fn zip<Z>(self, zip_op: Z) -> Zip<Self, Z::Iter>where
Z: IntoParallelIterator,
Z::Iter: IndexedParallelIterator,
Iterates over tuples
(A, B)
, where the items A
are from
this iterator and B
are from the iterator given as argument.
Like the zip
method on ordinary iterators, if the two
iterators are of unequal length, you only get the items they
have in common. Read moresourcefn zip_eq<Z>(self, zip_op: Z) -> ZipEq<Self, Z::Iter>where
Z: IntoParallelIterator,
Z::Iter: IndexedParallelIterator,
fn zip_eq<Z>(self, zip_op: Z) -> ZipEq<Self, Z::Iter>where
Z: IntoParallelIterator,
Z::Iter: IndexedParallelIterator,
The same as
Zip
, but requires that both iterators have the same length. Read moresourcefn interleave<I>(self, other: I) -> Interleave<Self, I::Iter>where
I: IntoParallelIterator<Item = Self::Item>,
I::Iter: IndexedParallelIterator<Item = Self::Item>,
fn interleave<I>(self, other: I) -> Interleave<Self, I::Iter>where
I: IntoParallelIterator<Item = Self::Item>,
I::Iter: IndexedParallelIterator<Item = Self::Item>,
Interleaves elements of this iterator and the other given
iterator. Alternately yields elements from this iterator and
the given iterator, until both are exhausted. If one iterator
is exhausted before the other, the last elements are provided
from the other. Read more
sourcefn interleave_shortest<I>(self, other: I) -> InterleaveShortest<Self, I::Iter>where
I: IntoParallelIterator<Item = Self::Item>,
I::Iter: IndexedParallelIterator<Item = Self::Item>,
fn interleave_shortest<I>(self, other: I) -> InterleaveShortest<Self, I::Iter>where
I: IntoParallelIterator<Item = Self::Item>,
I::Iter: IndexedParallelIterator<Item = Self::Item>,
Interleaves elements of this iterator and the other given
iterator, until one is exhausted. Read more
sourcefn chunks(self, chunk_size: usize) -> Chunks<Self>
fn chunks(self, chunk_size: usize) -> Chunks<Self>
Splits an iterator up into fixed-size chunks. Read more
sourcefn fold_chunks<T, ID, F>(
self,
chunk_size: usize,
identity: ID,
fold_op: F
) -> FoldChunks<Self, ID, F>where
ID: Fn() -> T + Send + Sync,
F: Fn(T, Self::Item) -> T + Send + Sync,
T: Send,
fn fold_chunks<T, ID, F>(
self,
chunk_size: usize,
identity: ID,
fold_op: F
) -> FoldChunks<Self, ID, F>where
ID: Fn() -> T + Send + Sync,
F: Fn(T, Self::Item) -> T + Send + Sync,
T: Send,
sourcefn fold_chunks_with<T, F>(
self,
chunk_size: usize,
init: T,
fold_op: F
) -> FoldChunksWith<Self, T, F>where
T: Send + Clone,
F: Fn(T, Self::Item) -> T + Send + Sync,
fn fold_chunks_with<T, F>(
self,
chunk_size: usize,
init: T,
fold_op: F
) -> FoldChunksWith<Self, T, F>where
T: Send + Clone,
F: Fn(T, Self::Item) -> T + Send + Sync,
sourcefn partial_cmp<I>(self, other: I) -> Option<Ordering>where
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
fn partial_cmp<I>(self, other: I) -> Option<Ordering>where
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
Lexicographically compares the elements of this
ParallelIterator
with those of
another. Read moresourcefn eq<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialEq<I::Item>,
fn eq<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialEq<I::Item>,
Determines if the elements of this
ParallelIterator
are equal to those of another Read moresourcefn ne<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialEq<I::Item>,
fn ne<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialEq<I::Item>,
Determines if the elements of this
ParallelIterator
are unequal to those of another Read moresourcefn lt<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
fn lt<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
Determines if the elements of this
ParallelIterator
are lexicographically less than those of another. Read moresourcefn le<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
fn le<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
Determines if the elements of this
ParallelIterator
are less or equal to those of another. Read moresourcefn gt<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
fn gt<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
Determines if the elements of this
ParallelIterator
are lexicographically greater than those of another. Read moresourcefn ge<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
fn ge<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
Determines if the elements of this
ParallelIterator
are less or equal to those of another. Read moresourcefn step_by(self, step: usize) -> StepBy<Self>
fn step_by(self, step: usize) -> StepBy<Self>
Creates an iterator that steps by the given amount Read more
sourcefn skip(self, n: usize) -> Skip<Self>
fn skip(self, n: usize) -> Skip<Self>
Creates an iterator that skips the first
n
elements. Read moresourcefn take(self, n: usize) -> Take<Self>
fn take(self, n: usize) -> Take<Self>
Creates an iterator that yields the first
n
elements. Read moresourcefn position_any<P>(self, predicate: P) -> Option<usize>where
P: Fn(Self::Item) -> bool + Sync + Send,
fn position_any<P>(self, predicate: P) -> Option<usize>where
P: Fn(Self::Item) -> bool + Sync + Send,
Searches for some item in the parallel iterator that
matches the given predicate, and returns its index. Like
ParallelIterator::find_any
, the parallel search will not
necessarily find the first match, and once a match is
found we’ll attempt to stop processing any more. Read moresourcefn position_first<P>(self, predicate: P) -> Option<usize>where
P: Fn(Self::Item) -> bool + Sync + Send,
fn position_first<P>(self, predicate: P) -> Option<usize>where
P: Fn(Self::Item) -> bool + Sync + Send,
Searches for the sequentially first item in the parallel iterator
that matches the given predicate, and returns its index. Read more
sourcefn position_last<P>(self, predicate: P) -> Option<usize>where
P: Fn(Self::Item) -> bool + Sync + Send,
fn position_last<P>(self, predicate: P) -> Option<usize>where
P: Fn(Self::Item) -> bool + Sync + Send,
Searches for the sequentially last item in the parallel iterator
that matches the given predicate, and returns its index. Read more
sourcefn positions<P>(self, predicate: P) -> Positions<Self, P>where
P: Fn(Self::Item) -> bool + Sync + Send,
fn positions<P>(self, predicate: P) -> Positions<Self, P>where
P: Fn(Self::Item) -> bool + Sync + Send,
Searches for items in the parallel iterator that match the given
predicate, and returns their indices. Read more
sourcefn rev(self) -> Rev<Self>
fn rev(self) -> Rev<Self>
Produces a new iterator with the elements of this iterator in
reverse order. Read more
sourcefn with_min_len(self, min: usize) -> MinLen<Self>
fn with_min_len(self, min: usize) -> MinLen<Self>
Sets the minimum length of iterators desired to process in each
rayon job. Rayon will not split any smaller than this length, but
of course an iterator could already be smaller to begin with. Read more
sourcefn with_max_len(self, max: usize) -> MaxLen<Self>
fn with_max_len(self, max: usize) -> MaxLen<Self>
Sets the maximum length of iterators desired to process in each
rayon job. Rayon will try to split at least below this length,
unless that would put it below the length from
with_min_len()
.
For example, given min=10 and max=15, a length of 16 will not be
split any further. Read moresourceimpl<A, B, C, D, E> IndexedParallelIterator for MultiZip<(A, B, C, D, E)>where
A: IndexedParallelIterator,
B: IndexedParallelIterator,
C: IndexedParallelIterator,
D: IndexedParallelIterator,
E: IndexedParallelIterator,
impl<A, B, C, D, E> IndexedParallelIterator for MultiZip<(A, B, C, D, E)>where
A: IndexedParallelIterator,
B: IndexedParallelIterator,
C: IndexedParallelIterator,
D: IndexedParallelIterator,
E: IndexedParallelIterator,
sourcefn drive<CONSUMER>(self, consumer: CONSUMER) -> CONSUMER::Resultwhere
CONSUMER: Consumer<Self::Item>,
fn drive<CONSUMER>(self, consumer: CONSUMER) -> CONSUMER::Resultwhere
CONSUMER: Consumer<Self::Item>,
Internal method used to define the behavior of this parallel
iterator. You should not need to call this directly. Read more
sourcefn len(&self) -> usize
fn len(&self) -> usize
Produces an exact count of how many items this iterator will
produce, presuming no panic occurs. Read more
sourcefn with_producer<CB>(self, callback: CB) -> CB::Outputwhere
CB: ProducerCallback<Self::Item>,
fn with_producer<CB>(self, callback: CB) -> CB::Outputwhere
CB: ProducerCallback<Self::Item>,
Internal method used to define the behavior of this parallel
iterator. You should not need to call this directly. Read more
sourcefn by_exponential_blocks(self) -> ExponentialBlocks<Self>
fn by_exponential_blocks(self) -> ExponentialBlocks<Self>
Divides an iterator into sequential blocks of exponentially-increasing size. Read more
sourcefn by_uniform_blocks(self, block_size: usize) -> UniformBlocks<Self>
fn by_uniform_blocks(self, block_size: usize) -> UniformBlocks<Self>
Divides an iterator into sequential blocks of the given size. Read more
sourcefn collect_into_vec(self, target: &mut Vec<Self::Item>)
fn collect_into_vec(self, target: &mut Vec<Self::Item>)
Collects the results of the iterator into the specified
vector. The vector is always cleared before execution
begins. If possible, reusing the vector across calls can lead
to better performance since it reuses the same backing buffer. Read more
sourcefn unzip_into_vecs<A, B>(self, left: &mut Vec<A>, right: &mut Vec<B>)where
Self: IndexedParallelIterator<Item = (A, B)>,
A: Send,
B: Send,
fn unzip_into_vecs<A, B>(self, left: &mut Vec<A>, right: &mut Vec<B>)where
Self: IndexedParallelIterator<Item = (A, B)>,
A: Send,
B: Send,
Unzips the results of the iterator into the specified
vectors. The vectors are always cleared before execution
begins. If possible, reusing the vectors across calls can lead
to better performance since they reuse the same backing buffer. Read more
sourcefn zip<Z>(self, zip_op: Z) -> Zip<Self, Z::Iter>where
Z: IntoParallelIterator,
Z::Iter: IndexedParallelIterator,
fn zip<Z>(self, zip_op: Z) -> Zip<Self, Z::Iter>where
Z: IntoParallelIterator,
Z::Iter: IndexedParallelIterator,
Iterates over tuples
(A, B)
, where the items A
are from
this iterator and B
are from the iterator given as argument.
Like the zip
method on ordinary iterators, if the two
iterators are of unequal length, you only get the items they
have in common. Read moresourcefn zip_eq<Z>(self, zip_op: Z) -> ZipEq<Self, Z::Iter>where
Z: IntoParallelIterator,
Z::Iter: IndexedParallelIterator,
fn zip_eq<Z>(self, zip_op: Z) -> ZipEq<Self, Z::Iter>where
Z: IntoParallelIterator,
Z::Iter: IndexedParallelIterator,
The same as
Zip
, but requires that both iterators have the same length. Read moresourcefn interleave<I>(self, other: I) -> Interleave<Self, I::Iter>where
I: IntoParallelIterator<Item = Self::Item>,
I::Iter: IndexedParallelIterator<Item = Self::Item>,
fn interleave<I>(self, other: I) -> Interleave<Self, I::Iter>where
I: IntoParallelIterator<Item = Self::Item>,
I::Iter: IndexedParallelIterator<Item = Self::Item>,
Interleaves elements of this iterator and the other given
iterator. Alternately yields elements from this iterator and
the given iterator, until both are exhausted. If one iterator
is exhausted before the other, the last elements are provided
from the other. Read more
sourcefn interleave_shortest<I>(self, other: I) -> InterleaveShortest<Self, I::Iter>where
I: IntoParallelIterator<Item = Self::Item>,
I::Iter: IndexedParallelIterator<Item = Self::Item>,
fn interleave_shortest<I>(self, other: I) -> InterleaveShortest<Self, I::Iter>where
I: IntoParallelIterator<Item = Self::Item>,
I::Iter: IndexedParallelIterator<Item = Self::Item>,
Interleaves elements of this iterator and the other given
iterator, until one is exhausted. Read more
sourcefn chunks(self, chunk_size: usize) -> Chunks<Self>
fn chunks(self, chunk_size: usize) -> Chunks<Self>
Splits an iterator up into fixed-size chunks. Read more
sourcefn fold_chunks<T, ID, F>(
self,
chunk_size: usize,
identity: ID,
fold_op: F
) -> FoldChunks<Self, ID, F>where
ID: Fn() -> T + Send + Sync,
F: Fn(T, Self::Item) -> T + Send + Sync,
T: Send,
fn fold_chunks<T, ID, F>(
self,
chunk_size: usize,
identity: ID,
fold_op: F
) -> FoldChunks<Self, ID, F>where
ID: Fn() -> T + Send + Sync,
F: Fn(T, Self::Item) -> T + Send + Sync,
T: Send,
sourcefn fold_chunks_with<T, F>(
self,
chunk_size: usize,
init: T,
fold_op: F
) -> FoldChunksWith<Self, T, F>where
T: Send + Clone,
F: Fn(T, Self::Item) -> T + Send + Sync,
fn fold_chunks_with<T, F>(
self,
chunk_size: usize,
init: T,
fold_op: F
) -> FoldChunksWith<Self, T, F>where
T: Send + Clone,
F: Fn(T, Self::Item) -> T + Send + Sync,
sourcefn partial_cmp<I>(self, other: I) -> Option<Ordering>where
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
fn partial_cmp<I>(self, other: I) -> Option<Ordering>where
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
Lexicographically compares the elements of this
ParallelIterator
with those of
another. Read moresourcefn eq<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialEq<I::Item>,
fn eq<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialEq<I::Item>,
Determines if the elements of this
ParallelIterator
are equal to those of another Read moresourcefn ne<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialEq<I::Item>,
fn ne<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialEq<I::Item>,
Determines if the elements of this
ParallelIterator
are unequal to those of another Read moresourcefn lt<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
fn lt<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
Determines if the elements of this
ParallelIterator
are lexicographically less than those of another. Read moresourcefn le<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
fn le<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
Determines if the elements of this
ParallelIterator
are less or equal to those of another. Read moresourcefn gt<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
fn gt<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
Determines if the elements of this
ParallelIterator
are lexicographically greater than those of another. Read moresourcefn ge<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
fn ge<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
Determines if the elements of this
ParallelIterator
are less or equal to those of another. Read moresourcefn step_by(self, step: usize) -> StepBy<Self>
fn step_by(self, step: usize) -> StepBy<Self>
Creates an iterator that steps by the given amount Read more
sourcefn skip(self, n: usize) -> Skip<Self>
fn skip(self, n: usize) -> Skip<Self>
Creates an iterator that skips the first
n
elements. Read moresourcefn take(self, n: usize) -> Take<Self>
fn take(self, n: usize) -> Take<Self>
Creates an iterator that yields the first
n
elements. Read moresourcefn position_any<P>(self, predicate: P) -> Option<usize>where
P: Fn(Self::Item) -> bool + Sync + Send,
fn position_any<P>(self, predicate: P) -> Option<usize>where
P: Fn(Self::Item) -> bool + Sync + Send,
Searches for some item in the parallel iterator that
matches the given predicate, and returns its index. Like
ParallelIterator::find_any
, the parallel search will not
necessarily find the first match, and once a match is
found we’ll attempt to stop processing any more. Read moresourcefn position_first<P>(self, predicate: P) -> Option<usize>where
P: Fn(Self::Item) -> bool + Sync + Send,
fn position_first<P>(self, predicate: P) -> Option<usize>where
P: Fn(Self::Item) -> bool + Sync + Send,
Searches for the sequentially first item in the parallel iterator
that matches the given predicate, and returns its index. Read more
sourcefn position_last<P>(self, predicate: P) -> Option<usize>where
P: Fn(Self::Item) -> bool + Sync + Send,
fn position_last<P>(self, predicate: P) -> Option<usize>where
P: Fn(Self::Item) -> bool + Sync + Send,
Searches for the sequentially last item in the parallel iterator
that matches the given predicate, and returns its index. Read more
sourcefn positions<P>(self, predicate: P) -> Positions<Self, P>where
P: Fn(Self::Item) -> bool + Sync + Send,
fn positions<P>(self, predicate: P) -> Positions<Self, P>where
P: Fn(Self::Item) -> bool + Sync + Send,
Searches for items in the parallel iterator that match the given
predicate, and returns their indices. Read more
sourcefn rev(self) -> Rev<Self>
fn rev(self) -> Rev<Self>
Produces a new iterator with the elements of this iterator in
reverse order. Read more
sourcefn with_min_len(self, min: usize) -> MinLen<Self>
fn with_min_len(self, min: usize) -> MinLen<Self>
Sets the minimum length of iterators desired to process in each
rayon job. Rayon will not split any smaller than this length, but
of course an iterator could already be smaller to begin with. Read more
sourcefn with_max_len(self, max: usize) -> MaxLen<Self>
fn with_max_len(self, max: usize) -> MaxLen<Self>
Sets the maximum length of iterators desired to process in each
rayon job. Rayon will try to split at least below this length,
unless that would put it below the length from
with_min_len()
.
For example, given min=10 and max=15, a length of 16 will not be
split any further. Read moresourceimpl<A, B, C, D> IndexedParallelIterator for MultiZip<(A, B, C, D)>where
A: IndexedParallelIterator,
B: IndexedParallelIterator,
C: IndexedParallelIterator,
D: IndexedParallelIterator,
impl<A, B, C, D> IndexedParallelIterator for MultiZip<(A, B, C, D)>where
A: IndexedParallelIterator,
B: IndexedParallelIterator,
C: IndexedParallelIterator,
D: IndexedParallelIterator,
sourcefn drive<CONSUMER>(self, consumer: CONSUMER) -> CONSUMER::Resultwhere
CONSUMER: Consumer<Self::Item>,
fn drive<CONSUMER>(self, consumer: CONSUMER) -> CONSUMER::Resultwhere
CONSUMER: Consumer<Self::Item>,
Internal method used to define the behavior of this parallel
iterator. You should not need to call this directly. Read more
sourcefn len(&self) -> usize
fn len(&self) -> usize
Produces an exact count of how many items this iterator will
produce, presuming no panic occurs. Read more
sourcefn with_producer<CB>(self, callback: CB) -> CB::Outputwhere
CB: ProducerCallback<Self::Item>,
fn with_producer<CB>(self, callback: CB) -> CB::Outputwhere
CB: ProducerCallback<Self::Item>,
Internal method used to define the behavior of this parallel
iterator. You should not need to call this directly. Read more
sourcefn by_exponential_blocks(self) -> ExponentialBlocks<Self>
fn by_exponential_blocks(self) -> ExponentialBlocks<Self>
Divides an iterator into sequential blocks of exponentially-increasing size. Read more
sourcefn by_uniform_blocks(self, block_size: usize) -> UniformBlocks<Self>
fn by_uniform_blocks(self, block_size: usize) -> UniformBlocks<Self>
Divides an iterator into sequential blocks of the given size. Read more
sourcefn collect_into_vec(self, target: &mut Vec<Self::Item>)
fn collect_into_vec(self, target: &mut Vec<Self::Item>)
Collects the results of the iterator into the specified
vector. The vector is always cleared before execution
begins. If possible, reusing the vector across calls can lead
to better performance since it reuses the same backing buffer. Read more
sourcefn unzip_into_vecs<A, B>(self, left: &mut Vec<A>, right: &mut Vec<B>)where
Self: IndexedParallelIterator<Item = (A, B)>,
A: Send,
B: Send,
fn unzip_into_vecs<A, B>(self, left: &mut Vec<A>, right: &mut Vec<B>)where
Self: IndexedParallelIterator<Item = (A, B)>,
A: Send,
B: Send,
Unzips the results of the iterator into the specified
vectors. The vectors are always cleared before execution
begins. If possible, reusing the vectors across calls can lead
to better performance since they reuse the same backing buffer. Read more
sourcefn zip<Z>(self, zip_op: Z) -> Zip<Self, Z::Iter>where
Z: IntoParallelIterator,
Z::Iter: IndexedParallelIterator,
fn zip<Z>(self, zip_op: Z) -> Zip<Self, Z::Iter>where
Z: IntoParallelIterator,
Z::Iter: IndexedParallelIterator,
Iterates over tuples
(A, B)
, where the items A
are from
this iterator and B
are from the iterator given as argument.
Like the zip
method on ordinary iterators, if the two
iterators are of unequal length, you only get the items they
have in common. Read moresourcefn zip_eq<Z>(self, zip_op: Z) -> ZipEq<Self, Z::Iter>where
Z: IntoParallelIterator,
Z::Iter: IndexedParallelIterator,
fn zip_eq<Z>(self, zip_op: Z) -> ZipEq<Self, Z::Iter>where
Z: IntoParallelIterator,
Z::Iter: IndexedParallelIterator,
The same as
Zip
, but requires that both iterators have the same length. Read moresourcefn interleave<I>(self, other: I) -> Interleave<Self, I::Iter>where
I: IntoParallelIterator<Item = Self::Item>,
I::Iter: IndexedParallelIterator<Item = Self::Item>,
fn interleave<I>(self, other: I) -> Interleave<Self, I::Iter>where
I: IntoParallelIterator<Item = Self::Item>,
I::Iter: IndexedParallelIterator<Item = Self::Item>,
Interleaves elements of this iterator and the other given
iterator. Alternately yields elements from this iterator and
the given iterator, until both are exhausted. If one iterator
is exhausted before the other, the last elements are provided
from the other. Read more
sourcefn interleave_shortest<I>(self, other: I) -> InterleaveShortest<Self, I::Iter>where
I: IntoParallelIterator<Item = Self::Item>,
I::Iter: IndexedParallelIterator<Item = Self::Item>,
fn interleave_shortest<I>(self, other: I) -> InterleaveShortest<Self, I::Iter>where
I: IntoParallelIterator<Item = Self::Item>,
I::Iter: IndexedParallelIterator<Item = Self::Item>,
Interleaves elements of this iterator and the other given
iterator, until one is exhausted. Read more
sourcefn chunks(self, chunk_size: usize) -> Chunks<Self>
fn chunks(self, chunk_size: usize) -> Chunks<Self>
Splits an iterator up into fixed-size chunks. Read more
sourcefn fold_chunks<T, ID, F>(
self,
chunk_size: usize,
identity: ID,
fold_op: F
) -> FoldChunks<Self, ID, F>where
ID: Fn() -> T + Send + Sync,
F: Fn(T, Self::Item) -> T + Send + Sync,
T: Send,
fn fold_chunks<T, ID, F>(
self,
chunk_size: usize,
identity: ID,
fold_op: F
) -> FoldChunks<Self, ID, F>where
ID: Fn() -> T + Send + Sync,
F: Fn(T, Self::Item) -> T + Send + Sync,
T: Send,
sourcefn fold_chunks_with<T, F>(
self,
chunk_size: usize,
init: T,
fold_op: F
) -> FoldChunksWith<Self, T, F>where
T: Send + Clone,
F: Fn(T, Self::Item) -> T + Send + Sync,
fn fold_chunks_with<T, F>(
self,
chunk_size: usize,
init: T,
fold_op: F
) -> FoldChunksWith<Self, T, F>where
T: Send + Clone,
F: Fn(T, Self::Item) -> T + Send + Sync,
sourcefn partial_cmp<I>(self, other: I) -> Option<Ordering>where
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
fn partial_cmp<I>(self, other: I) -> Option<Ordering>where
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
Lexicographically compares the elements of this
ParallelIterator
with those of
another. Read moresourcefn eq<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialEq<I::Item>,
fn eq<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialEq<I::Item>,
Determines if the elements of this
ParallelIterator
are equal to those of another Read moresourcefn ne<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialEq<I::Item>,
fn ne<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialEq<I::Item>,
Determines if the elements of this
ParallelIterator
are unequal to those of another Read moresourcefn lt<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
fn lt<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
Determines if the elements of this
ParallelIterator
are lexicographically less than those of another. Read moresourcefn le<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
fn le<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
Determines if the elements of this
ParallelIterator
are less or equal to those of another. Read moresourcefn gt<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
fn gt<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
Determines if the elements of this
ParallelIterator
are lexicographically greater than those of another. Read moresourcefn ge<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
fn ge<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
Determines if the elements of this
ParallelIterator
are less or equal to those of another. Read moresourcefn step_by(self, step: usize) -> StepBy<Self>
fn step_by(self, step: usize) -> StepBy<Self>
Creates an iterator that steps by the given amount Read more
sourcefn skip(self, n: usize) -> Skip<Self>
fn skip(self, n: usize) -> Skip<Self>
Creates an iterator that skips the first
n
elements. Read moresourcefn take(self, n: usize) -> Take<Self>
fn take(self, n: usize) -> Take<Self>
Creates an iterator that yields the first
n
elements. Read moresourcefn position_any<P>(self, predicate: P) -> Option<usize>where
P: Fn(Self::Item) -> bool + Sync + Send,
fn position_any<P>(self, predicate: P) -> Option<usize>where
P: Fn(Self::Item) -> bool + Sync + Send,
Searches for some item in the parallel iterator that
matches the given predicate, and returns its index. Like
ParallelIterator::find_any
, the parallel search will not
necessarily find the first match, and once a match is
found we’ll attempt to stop processing any more. Read moresourcefn position_first<P>(self, predicate: P) -> Option<usize>where
P: Fn(Self::Item) -> bool + Sync + Send,
fn position_first<P>(self, predicate: P) -> Option<usize>where
P: Fn(Self::Item) -> bool + Sync + Send,
Searches for the sequentially first item in the parallel iterator
that matches the given predicate, and returns its index. Read more
sourcefn position_last<P>(self, predicate: P) -> Option<usize>where
P: Fn(Self::Item) -> bool + Sync + Send,
fn position_last<P>(self, predicate: P) -> Option<usize>where
P: Fn(Self::Item) -> bool + Sync + Send,
Searches for the sequentially last item in the parallel iterator
that matches the given predicate, and returns its index. Read more
sourcefn positions<P>(self, predicate: P) -> Positions<Self, P>where
P: Fn(Self::Item) -> bool + Sync + Send,
fn positions<P>(self, predicate: P) -> Positions<Self, P>where
P: Fn(Self::Item) -> bool + Sync + Send,
Searches for items in the parallel iterator that match the given
predicate, and returns their indices. Read more
sourcefn rev(self) -> Rev<Self>
fn rev(self) -> Rev<Self>
Produces a new iterator with the elements of this iterator in
reverse order. Read more
sourcefn with_min_len(self, min: usize) -> MinLen<Self>
fn with_min_len(self, min: usize) -> MinLen<Self>
Sets the minimum length of iterators desired to process in each
rayon job. Rayon will not split any smaller than this length, but
of course an iterator could already be smaller to begin with. Read more
sourcefn with_max_len(self, max: usize) -> MaxLen<Self>
fn with_max_len(self, max: usize) -> MaxLen<Self>
Sets the maximum length of iterators desired to process in each
rayon job. Rayon will try to split at least below this length,
unless that would put it below the length from
with_min_len()
.
For example, given min=10 and max=15, a length of 16 will not be
split any further. Read moresourceimpl<A, B, C> IndexedParallelIterator for MultiZip<(A, B, C)>where
A: IndexedParallelIterator,
B: IndexedParallelIterator,
C: IndexedParallelIterator,
impl<A, B, C> IndexedParallelIterator for MultiZip<(A, B, C)>where
A: IndexedParallelIterator,
B: IndexedParallelIterator,
C: IndexedParallelIterator,
sourcefn drive<CONSUMER>(self, consumer: CONSUMER) -> CONSUMER::Resultwhere
CONSUMER: Consumer<Self::Item>,
fn drive<CONSUMER>(self, consumer: CONSUMER) -> CONSUMER::Resultwhere
CONSUMER: Consumer<Self::Item>,
Internal method used to define the behavior of this parallel
iterator. You should not need to call this directly. Read more
sourcefn len(&self) -> usize
fn len(&self) -> usize
Produces an exact count of how many items this iterator will
produce, presuming no panic occurs. Read more
sourcefn with_producer<CB>(self, callback: CB) -> CB::Outputwhere
CB: ProducerCallback<Self::Item>,
fn with_producer<CB>(self, callback: CB) -> CB::Outputwhere
CB: ProducerCallback<Self::Item>,
Internal method used to define the behavior of this parallel
iterator. You should not need to call this directly. Read more
sourcefn by_exponential_blocks(self) -> ExponentialBlocks<Self>
fn by_exponential_blocks(self) -> ExponentialBlocks<Self>
Divides an iterator into sequential blocks of exponentially-increasing size. Read more
sourcefn by_uniform_blocks(self, block_size: usize) -> UniformBlocks<Self>
fn by_uniform_blocks(self, block_size: usize) -> UniformBlocks<Self>
Divides an iterator into sequential blocks of the given size. Read more
sourcefn collect_into_vec(self, target: &mut Vec<Self::Item>)
fn collect_into_vec(self, target: &mut Vec<Self::Item>)
Collects the results of the iterator into the specified
vector. The vector is always cleared before execution
begins. If possible, reusing the vector across calls can lead
to better performance since it reuses the same backing buffer. Read more
sourcefn unzip_into_vecs<A, B>(self, left: &mut Vec<A>, right: &mut Vec<B>)where
Self: IndexedParallelIterator<Item = (A, B)>,
A: Send,
B: Send,
fn unzip_into_vecs<A, B>(self, left: &mut Vec<A>, right: &mut Vec<B>)where
Self: IndexedParallelIterator<Item = (A, B)>,
A: Send,
B: Send,
Unzips the results of the iterator into the specified
vectors. The vectors are always cleared before execution
begins. If possible, reusing the vectors across calls can lead
to better performance since they reuse the same backing buffer. Read more
sourcefn zip<Z>(self, zip_op: Z) -> Zip<Self, Z::Iter>where
Z: IntoParallelIterator,
Z::Iter: IndexedParallelIterator,
fn zip<Z>(self, zip_op: Z) -> Zip<Self, Z::Iter>where
Z: IntoParallelIterator,
Z::Iter: IndexedParallelIterator,
Iterates over tuples
(A, B)
, where the items A
are from
this iterator and B
are from the iterator given as argument.
Like the zip
method on ordinary iterators, if the two
iterators are of unequal length, you only get the items they
have in common. Read moresourcefn zip_eq<Z>(self, zip_op: Z) -> ZipEq<Self, Z::Iter>where
Z: IntoParallelIterator,
Z::Iter: IndexedParallelIterator,
fn zip_eq<Z>(self, zip_op: Z) -> ZipEq<Self, Z::Iter>where
Z: IntoParallelIterator,
Z::Iter: IndexedParallelIterator,
The same as
Zip
, but requires that both iterators have the same length. Read moresourcefn interleave<I>(self, other: I) -> Interleave<Self, I::Iter>where
I: IntoParallelIterator<Item = Self::Item>,
I::Iter: IndexedParallelIterator<Item = Self::Item>,
fn interleave<I>(self, other: I) -> Interleave<Self, I::Iter>where
I: IntoParallelIterator<Item = Self::Item>,
I::Iter: IndexedParallelIterator<Item = Self::Item>,
Interleaves elements of this iterator and the other given
iterator. Alternately yields elements from this iterator and
the given iterator, until both are exhausted. If one iterator
is exhausted before the other, the last elements are provided
from the other. Read more
sourcefn interleave_shortest<I>(self, other: I) -> InterleaveShortest<Self, I::Iter>where
I: IntoParallelIterator<Item = Self::Item>,
I::Iter: IndexedParallelIterator<Item = Self::Item>,
fn interleave_shortest<I>(self, other: I) -> InterleaveShortest<Self, I::Iter>where
I: IntoParallelIterator<Item = Self::Item>,
I::Iter: IndexedParallelIterator<Item = Self::Item>,
Interleaves elements of this iterator and the other given
iterator, until one is exhausted. Read more
sourcefn chunks(self, chunk_size: usize) -> Chunks<Self>
fn chunks(self, chunk_size: usize) -> Chunks<Self>
Splits an iterator up into fixed-size chunks. Read more
sourcefn fold_chunks<T, ID, F>(
self,
chunk_size: usize,
identity: ID,
fold_op: F
) -> FoldChunks<Self, ID, F>where
ID: Fn() -> T + Send + Sync,
F: Fn(T, Self::Item) -> T + Send + Sync,
T: Send,
fn fold_chunks<T, ID, F>(
self,
chunk_size: usize,
identity: ID,
fold_op: F
) -> FoldChunks<Self, ID, F>where
ID: Fn() -> T + Send + Sync,
F: Fn(T, Self::Item) -> T + Send + Sync,
T: Send,
sourcefn fold_chunks_with<T, F>(
self,
chunk_size: usize,
init: T,
fold_op: F
) -> FoldChunksWith<Self, T, F>where
T: Send + Clone,
F: Fn(T, Self::Item) -> T + Send + Sync,
fn fold_chunks_with<T, F>(
self,
chunk_size: usize,
init: T,
fold_op: F
) -> FoldChunksWith<Self, T, F>where
T: Send + Clone,
F: Fn(T, Self::Item) -> T + Send + Sync,
sourcefn partial_cmp<I>(self, other: I) -> Option<Ordering>where
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
fn partial_cmp<I>(self, other: I) -> Option<Ordering>where
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
Lexicographically compares the elements of this
ParallelIterator
with those of
another. Read moresourcefn eq<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialEq<I::Item>,
fn eq<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialEq<I::Item>,
Determines if the elements of this
ParallelIterator
are equal to those of another Read moresourcefn ne<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialEq<I::Item>,
fn ne<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialEq<I::Item>,
Determines if the elements of this
ParallelIterator
are unequal to those of another Read moresourcefn lt<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
fn lt<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
Determines if the elements of this
ParallelIterator
are lexicographically less than those of another. Read moresourcefn le<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
fn le<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
Determines if the elements of this
ParallelIterator
are less or equal to those of another. Read moresourcefn gt<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
fn gt<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
Determines if the elements of this
ParallelIterator
are lexicographically greater than those of another. Read moresourcefn ge<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
fn ge<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
Determines if the elements of this
ParallelIterator
are less or equal to those of another. Read moresourcefn step_by(self, step: usize) -> StepBy<Self>
fn step_by(self, step: usize) -> StepBy<Self>
Creates an iterator that steps by the given amount Read more
sourcefn skip(self, n: usize) -> Skip<Self>
fn skip(self, n: usize) -> Skip<Self>
Creates an iterator that skips the first
n
elements. Read moresourcefn take(self, n: usize) -> Take<Self>
fn take(self, n: usize) -> Take<Self>
Creates an iterator that yields the first
n
elements. Read moresourcefn position_any<P>(self, predicate: P) -> Option<usize>where
P: Fn(Self::Item) -> bool + Sync + Send,
fn position_any<P>(self, predicate: P) -> Option<usize>where
P: Fn(Self::Item) -> bool + Sync + Send,
Searches for some item in the parallel iterator that
matches the given predicate, and returns its index. Like
ParallelIterator::find_any
, the parallel search will not
necessarily find the first match, and once a match is
found we’ll attempt to stop processing any more. Read moresourcefn position_first<P>(self, predicate: P) -> Option<usize>where
P: Fn(Self::Item) -> bool + Sync + Send,
fn position_first<P>(self, predicate: P) -> Option<usize>where
P: Fn(Self::Item) -> bool + Sync + Send,
Searches for the sequentially first item in the parallel iterator
that matches the given predicate, and returns its index. Read more
sourcefn position_last<P>(self, predicate: P) -> Option<usize>where
P: Fn(Self::Item) -> bool + Sync + Send,
fn position_last<P>(self, predicate: P) -> Option<usize>where
P: Fn(Self::Item) -> bool + Sync + Send,
Searches for the sequentially last item in the parallel iterator
that matches the given predicate, and returns its index. Read more
sourcefn positions<P>(self, predicate: P) -> Positions<Self, P>where
P: Fn(Self::Item) -> bool + Sync + Send,
fn positions<P>(self, predicate: P) -> Positions<Self, P>where
P: Fn(Self::Item) -> bool + Sync + Send,
Searches for items in the parallel iterator that match the given
predicate, and returns their indices. Read more
sourcefn rev(self) -> Rev<Self>
fn rev(self) -> Rev<Self>
Produces a new iterator with the elements of this iterator in
reverse order. Read more
sourcefn with_min_len(self, min: usize) -> MinLen<Self>
fn with_min_len(self, min: usize) -> MinLen<Self>
Sets the minimum length of iterators desired to process in each
rayon job. Rayon will not split any smaller than this length, but
of course an iterator could already be smaller to begin with. Read more
sourcefn with_max_len(self, max: usize) -> MaxLen<Self>
fn with_max_len(self, max: usize) -> MaxLen<Self>
Sets the maximum length of iterators desired to process in each
rayon job. Rayon will try to split at least below this length,
unless that would put it below the length from
with_min_len()
.
For example, given min=10 and max=15, a length of 16 will not be
split any further. Read moresourceimpl<A, B> IndexedParallelIterator for MultiZip<(A, B)>where
A: IndexedParallelIterator,
B: IndexedParallelIterator,
impl<A, B> IndexedParallelIterator for MultiZip<(A, B)>where
A: IndexedParallelIterator,
B: IndexedParallelIterator,
sourcefn drive<CONSUMER>(self, consumer: CONSUMER) -> CONSUMER::Resultwhere
CONSUMER: Consumer<Self::Item>,
fn drive<CONSUMER>(self, consumer: CONSUMER) -> CONSUMER::Resultwhere
CONSUMER: Consumer<Self::Item>,
Internal method used to define the behavior of this parallel
iterator. You should not need to call this directly. Read more
sourcefn len(&self) -> usize
fn len(&self) -> usize
Produces an exact count of how many items this iterator will
produce, presuming no panic occurs. Read more
sourcefn with_producer<CB>(self, callback: CB) -> CB::Outputwhere
CB: ProducerCallback<Self::Item>,
fn with_producer<CB>(self, callback: CB) -> CB::Outputwhere
CB: ProducerCallback<Self::Item>,
Internal method used to define the behavior of this parallel
iterator. You should not need to call this directly. Read more
sourcefn by_exponential_blocks(self) -> ExponentialBlocks<Self>
fn by_exponential_blocks(self) -> ExponentialBlocks<Self>
Divides an iterator into sequential blocks of exponentially-increasing size. Read more
sourcefn by_uniform_blocks(self, block_size: usize) -> UniformBlocks<Self>
fn by_uniform_blocks(self, block_size: usize) -> UniformBlocks<Self>
Divides an iterator into sequential blocks of the given size. Read more
sourcefn collect_into_vec(self, target: &mut Vec<Self::Item>)
fn collect_into_vec(self, target: &mut Vec<Self::Item>)
Collects the results of the iterator into the specified
vector. The vector is always cleared before execution
begins. If possible, reusing the vector across calls can lead
to better performance since it reuses the same backing buffer. Read more
sourcefn unzip_into_vecs<A, B>(self, left: &mut Vec<A>, right: &mut Vec<B>)where
Self: IndexedParallelIterator<Item = (A, B)>,
A: Send,
B: Send,
fn unzip_into_vecs<A, B>(self, left: &mut Vec<A>, right: &mut Vec<B>)where
Self: IndexedParallelIterator<Item = (A, B)>,
A: Send,
B: Send,
Unzips the results of the iterator into the specified
vectors. The vectors are always cleared before execution
begins. If possible, reusing the vectors across calls can lead
to better performance since they reuse the same backing buffer. Read more
sourcefn zip<Z>(self, zip_op: Z) -> Zip<Self, Z::Iter>where
Z: IntoParallelIterator,
Z::Iter: IndexedParallelIterator,
fn zip<Z>(self, zip_op: Z) -> Zip<Self, Z::Iter>where
Z: IntoParallelIterator,
Z::Iter: IndexedParallelIterator,
Iterates over tuples
(A, B)
, where the items A
are from
this iterator and B
are from the iterator given as argument.
Like the zip
method on ordinary iterators, if the two
iterators are of unequal length, you only get the items they
have in common. Read moresourcefn zip_eq<Z>(self, zip_op: Z) -> ZipEq<Self, Z::Iter>where
Z: IntoParallelIterator,
Z::Iter: IndexedParallelIterator,
fn zip_eq<Z>(self, zip_op: Z) -> ZipEq<Self, Z::Iter>where
Z: IntoParallelIterator,
Z::Iter: IndexedParallelIterator,
The same as
Zip
, but requires that both iterators have the same length. Read moresourcefn interleave<I>(self, other: I) -> Interleave<Self, I::Iter>where
I: IntoParallelIterator<Item = Self::Item>,
I::Iter: IndexedParallelIterator<Item = Self::Item>,
fn interleave<I>(self, other: I) -> Interleave<Self, I::Iter>where
I: IntoParallelIterator<Item = Self::Item>,
I::Iter: IndexedParallelIterator<Item = Self::Item>,
Interleaves elements of this iterator and the other given
iterator. Alternately yields elements from this iterator and
the given iterator, until both are exhausted. If one iterator
is exhausted before the other, the last elements are provided
from the other. Read more
sourcefn interleave_shortest<I>(self, other: I) -> InterleaveShortest<Self, I::Iter>where
I: IntoParallelIterator<Item = Self::Item>,
I::Iter: IndexedParallelIterator<Item = Self::Item>,
fn interleave_shortest<I>(self, other: I) -> InterleaveShortest<Self, I::Iter>where
I: IntoParallelIterator<Item = Self::Item>,
I::Iter: IndexedParallelIterator<Item = Self::Item>,
Interleaves elements of this iterator and the other given
iterator, until one is exhausted. Read more
sourcefn chunks(self, chunk_size: usize) -> Chunks<Self>
fn chunks(self, chunk_size: usize) -> Chunks<Self>
Splits an iterator up into fixed-size chunks. Read more
sourcefn fold_chunks<T, ID, F>(
self,
chunk_size: usize,
identity: ID,
fold_op: F
) -> FoldChunks<Self, ID, F>where
ID: Fn() -> T + Send + Sync,
F: Fn(T, Self::Item) -> T + Send + Sync,
T: Send,
fn fold_chunks<T, ID, F>(
self,
chunk_size: usize,
identity: ID,
fold_op: F
) -> FoldChunks<Self, ID, F>where
ID: Fn() -> T + Send + Sync,
F: Fn(T, Self::Item) -> T + Send + Sync,
T: Send,
sourcefn fold_chunks_with<T, F>(
self,
chunk_size: usize,
init: T,
fold_op: F
) -> FoldChunksWith<Self, T, F>where
T: Send + Clone,
F: Fn(T, Self::Item) -> T + Send + Sync,
fn fold_chunks_with<T, F>(
self,
chunk_size: usize,
init: T,
fold_op: F
) -> FoldChunksWith<Self, T, F>where
T: Send + Clone,
F: Fn(T, Self::Item) -> T + Send + Sync,
sourcefn partial_cmp<I>(self, other: I) -> Option<Ordering>where
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
fn partial_cmp<I>(self, other: I) -> Option<Ordering>where
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
Lexicographically compares the elements of this
ParallelIterator
with those of
another. Read moresourcefn eq<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialEq<I::Item>,
fn eq<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialEq<I::Item>,
Determines if the elements of this
ParallelIterator
are equal to those of another Read moresourcefn ne<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialEq<I::Item>,
fn ne<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialEq<I::Item>,
Determines if the elements of this
ParallelIterator
are unequal to those of another Read moresourcefn lt<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
fn lt<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
Determines if the elements of this
ParallelIterator
are lexicographically less than those of another. Read moresourcefn le<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
fn le<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
Determines if the elements of this
ParallelIterator
are less or equal to those of another. Read moresourcefn gt<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
fn gt<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
Determines if the elements of this
ParallelIterator
are lexicographically greater than those of another. Read moresourcefn ge<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
fn ge<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
Determines if the elements of this
ParallelIterator
are less or equal to those of another. Read moresourcefn step_by(self, step: usize) -> StepBy<Self>
fn step_by(self, step: usize) -> StepBy<Self>
Creates an iterator that steps by the given amount Read more
sourcefn skip(self, n: usize) -> Skip<Self>
fn skip(self, n: usize) -> Skip<Self>
Creates an iterator that skips the first
n
elements. Read moresourcefn take(self, n: usize) -> Take<Self>
fn take(self, n: usize) -> Take<Self>
Creates an iterator that yields the first
n
elements. Read moresourcefn position_any<P>(self, predicate: P) -> Option<usize>where
P: Fn(Self::Item) -> bool + Sync + Send,
fn position_any<P>(self, predicate: P) -> Option<usize>where
P: Fn(Self::Item) -> bool + Sync + Send,
Searches for some item in the parallel iterator that
matches the given predicate, and returns its index. Like
ParallelIterator::find_any
, the parallel search will not
necessarily find the first match, and once a match is
found we’ll attempt to stop processing any more. Read moresourcefn position_first<P>(self, predicate: P) -> Option<usize>where
P: Fn(Self::Item) -> bool + Sync + Send,
fn position_first<P>(self, predicate: P) -> Option<usize>where
P: Fn(Self::Item) -> bool + Sync + Send,
Searches for the sequentially first item in the parallel iterator
that matches the given predicate, and returns its index. Read more
sourcefn position_last<P>(self, predicate: P) -> Option<usize>where
P: Fn(Self::Item) -> bool + Sync + Send,
fn position_last<P>(self, predicate: P) -> Option<usize>where
P: Fn(Self::Item) -> bool + Sync + Send,
Searches for the sequentially last item in the parallel iterator
that matches the given predicate, and returns its index. Read more
sourcefn positions<P>(self, predicate: P) -> Positions<Self, P>where
P: Fn(Self::Item) -> bool + Sync + Send,
fn positions<P>(self, predicate: P) -> Positions<Self, P>where
P: Fn(Self::Item) -> bool + Sync + Send,
Searches for items in the parallel iterator that match the given
predicate, and returns their indices. Read more
sourcefn rev(self) -> Rev<Self>
fn rev(self) -> Rev<Self>
Produces a new iterator with the elements of this iterator in
reverse order. Read more
sourcefn with_min_len(self, min: usize) -> MinLen<Self>
fn with_min_len(self, min: usize) -> MinLen<Self>
Sets the minimum length of iterators desired to process in each
rayon job. Rayon will not split any smaller than this length, but
of course an iterator could already be smaller to begin with. Read more
sourcefn with_max_len(self, max: usize) -> MaxLen<Self>
fn with_max_len(self, max: usize) -> MaxLen<Self>
Sets the maximum length of iterators desired to process in each
rayon job. Rayon will try to split at least below this length,
unless that would put it below the length from
with_min_len()
.
For example, given min=10 and max=15, a length of 16 will not be
split any further. Read moresourceimpl<A> IndexedParallelIterator for MultiZip<(A,)>where
A: IndexedParallelIterator,
impl<A> IndexedParallelIterator for MultiZip<(A,)>where
A: IndexedParallelIterator,
sourcefn drive<CONSUMER>(self, consumer: CONSUMER) -> CONSUMER::Resultwhere
CONSUMER: Consumer<Self::Item>,
fn drive<CONSUMER>(self, consumer: CONSUMER) -> CONSUMER::Resultwhere
CONSUMER: Consumer<Self::Item>,
Internal method used to define the behavior of this parallel
iterator. You should not need to call this directly. Read more
sourcefn len(&self) -> usize
fn len(&self) -> usize
Produces an exact count of how many items this iterator will
produce, presuming no panic occurs. Read more
sourcefn with_producer<CB>(self, callback: CB) -> CB::Outputwhere
CB: ProducerCallback<Self::Item>,
fn with_producer<CB>(self, callback: CB) -> CB::Outputwhere
CB: ProducerCallback<Self::Item>,
Internal method used to define the behavior of this parallel
iterator. You should not need to call this directly. Read more
sourcefn by_exponential_blocks(self) -> ExponentialBlocks<Self>
fn by_exponential_blocks(self) -> ExponentialBlocks<Self>
Divides an iterator into sequential blocks of exponentially-increasing size. Read more
sourcefn by_uniform_blocks(self, block_size: usize) -> UniformBlocks<Self>
fn by_uniform_blocks(self, block_size: usize) -> UniformBlocks<Self>
Divides an iterator into sequential blocks of the given size. Read more
sourcefn collect_into_vec(self, target: &mut Vec<Self::Item>)
fn collect_into_vec(self, target: &mut Vec<Self::Item>)
Collects the results of the iterator into the specified
vector. The vector is always cleared before execution
begins. If possible, reusing the vector across calls can lead
to better performance since it reuses the same backing buffer. Read more
sourcefn unzip_into_vecs<A, B>(self, left: &mut Vec<A>, right: &mut Vec<B>)where
Self: IndexedParallelIterator<Item = (A, B)>,
A: Send,
B: Send,
fn unzip_into_vecs<A, B>(self, left: &mut Vec<A>, right: &mut Vec<B>)where
Self: IndexedParallelIterator<Item = (A, B)>,
A: Send,
B: Send,
Unzips the results of the iterator into the specified
vectors. The vectors are always cleared before execution
begins. If possible, reusing the vectors across calls can lead
to better performance since they reuse the same backing buffer. Read more
sourcefn zip<Z>(self, zip_op: Z) -> Zip<Self, Z::Iter>where
Z: IntoParallelIterator,
Z::Iter: IndexedParallelIterator,
fn zip<Z>(self, zip_op: Z) -> Zip<Self, Z::Iter>where
Z: IntoParallelIterator,
Z::Iter: IndexedParallelIterator,
Iterates over tuples
(A, B)
, where the items A
are from
this iterator and B
are from the iterator given as argument.
Like the zip
method on ordinary iterators, if the two
iterators are of unequal length, you only get the items they
have in common. Read moresourcefn zip_eq<Z>(self, zip_op: Z) -> ZipEq<Self, Z::Iter>where
Z: IntoParallelIterator,
Z::Iter: IndexedParallelIterator,
fn zip_eq<Z>(self, zip_op: Z) -> ZipEq<Self, Z::Iter>where
Z: IntoParallelIterator,
Z::Iter: IndexedParallelIterator,
The same as
Zip
, but requires that both iterators have the same length. Read moresourcefn interleave<I>(self, other: I) -> Interleave<Self, I::Iter>where
I: IntoParallelIterator<Item = Self::Item>,
I::Iter: IndexedParallelIterator<Item = Self::Item>,
fn interleave<I>(self, other: I) -> Interleave<Self, I::Iter>where
I: IntoParallelIterator<Item = Self::Item>,
I::Iter: IndexedParallelIterator<Item = Self::Item>,
Interleaves elements of this iterator and the other given
iterator. Alternately yields elements from this iterator and
the given iterator, until both are exhausted. If one iterator
is exhausted before the other, the last elements are provided
from the other. Read more
sourcefn interleave_shortest<I>(self, other: I) -> InterleaveShortest<Self, I::Iter>where
I: IntoParallelIterator<Item = Self::Item>,
I::Iter: IndexedParallelIterator<Item = Self::Item>,
fn interleave_shortest<I>(self, other: I) -> InterleaveShortest<Self, I::Iter>where
I: IntoParallelIterator<Item = Self::Item>,
I::Iter: IndexedParallelIterator<Item = Self::Item>,
Interleaves elements of this iterator and the other given
iterator, until one is exhausted. Read more
sourcefn chunks(self, chunk_size: usize) -> Chunks<Self>
fn chunks(self, chunk_size: usize) -> Chunks<Self>
Splits an iterator up into fixed-size chunks. Read more
sourcefn fold_chunks<T, ID, F>(
self,
chunk_size: usize,
identity: ID,
fold_op: F
) -> FoldChunks<Self, ID, F>where
ID: Fn() -> T + Send + Sync,
F: Fn(T, Self::Item) -> T + Send + Sync,
T: Send,
fn fold_chunks<T, ID, F>(
self,
chunk_size: usize,
identity: ID,
fold_op: F
) -> FoldChunks<Self, ID, F>where
ID: Fn() -> T + Send + Sync,
F: Fn(T, Self::Item) -> T + Send + Sync,
T: Send,
sourcefn fold_chunks_with<T, F>(
self,
chunk_size: usize,
init: T,
fold_op: F
) -> FoldChunksWith<Self, T, F>where
T: Send + Clone,
F: Fn(T, Self::Item) -> T + Send + Sync,
fn fold_chunks_with<T, F>(
self,
chunk_size: usize,
init: T,
fold_op: F
) -> FoldChunksWith<Self, T, F>where
T: Send + Clone,
F: Fn(T, Self::Item) -> T + Send + Sync,
sourcefn partial_cmp<I>(self, other: I) -> Option<Ordering>where
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
fn partial_cmp<I>(self, other: I) -> Option<Ordering>where
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
Lexicographically compares the elements of this
ParallelIterator
with those of
another. Read moresourcefn eq<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialEq<I::Item>,
fn eq<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialEq<I::Item>,
Determines if the elements of this
ParallelIterator
are equal to those of another Read moresourcefn ne<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialEq<I::Item>,
fn ne<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialEq<I::Item>,
Determines if the elements of this
ParallelIterator
are unequal to those of another Read moresourcefn lt<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
fn lt<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
Determines if the elements of this
ParallelIterator
are lexicographically less than those of another. Read moresourcefn le<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
fn le<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
Determines if the elements of this
ParallelIterator
are less or equal to those of another. Read moresourcefn gt<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
fn gt<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
Determines if the elements of this
ParallelIterator
are lexicographically greater than those of another. Read moresourcefn ge<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
fn ge<I>(self, other: I) -> boolwhere
I: IntoParallelIterator,
I::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<I::Item>,
Determines if the elements of this
ParallelIterator
are less or equal to those of another. Read moresourcefn step_by(self, step: usize) -> StepBy<Self>
fn step_by(self, step: usize) -> StepBy<Self>
Creates an iterator that steps by the given amount Read more
sourcefn skip(self, n: usize) -> Skip<Self>
fn skip(self, n: usize) -> Skip<Self>
Creates an iterator that skips the first
n
elements. Read moresourcefn take(self, n: usize) -> Take<Self>
fn take(self, n: usize) -> Take<Self>
Creates an iterator that yields the first
n
elements. Read moresourcefn position_any<P>(self, predicate: P) -> Option<usize>where
P: Fn(Self::Item) -> bool + Sync + Send,
fn position_any<P>(self, predicate: P) -> Option<usize>where
P: Fn(Self::Item) -> bool + Sync + Send,
Searches for some item in the parallel iterator that
matches the given predicate, and returns its index. Like
ParallelIterator::find_any
, the parallel search will not
necessarily find the first match, and once a match is
found we’ll attempt to stop processing any more. Read moresourcefn position_first<P>(self, predicate: P) -> Option<usize>where
P: Fn(Self::Item) -> bool + Sync + Send,
fn position_first<P>(self, predicate: P) -> Option<usize>where
P: Fn(Self::Item) -> bool + Sync + Send,
Searches for the sequentially first item in the parallel iterator
that matches the given predicate, and returns its index. Read more
sourcefn position_last<P>(self, predicate: P) -> Option<usize>where
P: Fn(Self::Item) -> bool + Sync + Send,
fn position_last<P>(self, predicate: P) -> Option<usize>where
P: Fn(Self::Item) -> bool + Sync + Send,
Searches for the sequentially last item in the parallel iterator
that matches the given predicate, and returns its index. Read more
sourcefn positions<P>(self, predicate: P) -> Positions<Self, P>where
P: Fn(Self::Item) -> bool + Sync + Send,
fn positions<P>(self, predicate: P) -> Positions<Self, P>where
P: Fn(Self::Item) -> bool + Sync + Send,
Searches for items in the parallel iterator that match the given
predicate, and returns their indices. Read more
sourcefn rev(self) -> Rev<Self>
fn rev(self) -> Rev<Self>
Produces a new iterator with the elements of this iterator in
reverse order. Read more
sourcefn with_min_len(self, min: usize) -> MinLen<Self>
fn with_min_len(self, min: usize) -> MinLen<Self>
Sets the minimum length of iterators desired to process in each
rayon job. Rayon will not split any smaller than this length, but
of course an iterator could already be smaller to begin with. Read more
sourcefn with_max_len(self, max: usize) -> MaxLen<Self>
fn with_max_len(self, max: usize) -> MaxLen<Self>
Sets the maximum length of iterators desired to process in each
rayon job. Rayon will try to split at least below this length,
unless that would put it below the length from
with_min_len()
.
For example, given min=10 and max=15, a length of 16 will not be
split any further. Read moresourceimpl<A, B, C, D, E, F, G, H, I, J, K, L> ParallelIterator for MultiZip<(A, B, C, D, E, F, G, H, I, J, K, L)>where
A: IndexedParallelIterator,
B: IndexedParallelIterator,
C: IndexedParallelIterator,
D: IndexedParallelIterator,
E: IndexedParallelIterator,
F: IndexedParallelIterator,
G: IndexedParallelIterator,
H: IndexedParallelIterator,
I: IndexedParallelIterator,
J: IndexedParallelIterator,
K: IndexedParallelIterator,
L: IndexedParallelIterator,
impl<A, B, C, D, E, F, G, H, I, J, K, L> ParallelIterator for MultiZip<(A, B, C, D, E, F, G, H, I, J, K, L)>where
A: IndexedParallelIterator,
B: IndexedParallelIterator,
C: IndexedParallelIterator,
D: IndexedParallelIterator,
E: IndexedParallelIterator,
F: IndexedParallelIterator,
G: IndexedParallelIterator,
H: IndexedParallelIterator,
I: IndexedParallelIterator,
J: IndexedParallelIterator,
K: IndexedParallelIterator,
L: IndexedParallelIterator,
type Item = (<A as ParallelIterator>::Item, <B as ParallelIterator>::Item, <C as ParallelIterator>::Item, <D as ParallelIterator>::Item, <E as ParallelIterator>::Item, <F as ParallelIterator>::Item, <G as ParallelIterator>::Item, <H as ParallelIterator>::Item, <I as ParallelIterator>::Item, <J as ParallelIterator>::Item, <K as ParallelIterator>::Item, <L as ParallelIterator>::Item)
type Item = (<A as ParallelIterator>::Item, <B as ParallelIterator>::Item, <C as ParallelIterator>::Item, <D as ParallelIterator>::Item, <E as ParallelIterator>::Item, <F as ParallelIterator>::Item, <G as ParallelIterator>::Item, <H as ParallelIterator>::Item, <I as ParallelIterator>::Item, <J as ParallelIterator>::Item, <K as ParallelIterator>::Item, <L as ParallelIterator>::Item)
sourcefn drive_unindexed<CONSUMER>(self, consumer: CONSUMER) -> CONSUMER::Resultwhere
CONSUMER: UnindexedConsumer<Self::Item>,
fn drive_unindexed<CONSUMER>(self, consumer: CONSUMER) -> CONSUMER::Resultwhere
CONSUMER: UnindexedConsumer<Self::Item>,
Internal method used to define the behavior of this parallel
iterator. You should not need to call this directly. Read more
sourcefn opt_len(&self) -> Option<usize>
fn opt_len(&self) -> Option<usize>
Internal method used to define the behavior of this parallel
iterator. You should not need to call this directly. Read more
sourcefn for_each<OP>(self, op: OP)where
OP: Fn(Self::Item) + Sync + Send,
fn for_each<OP>(self, op: OP)where
OP: Fn(Self::Item) + Sync + Send,
Executes
OP
on each item produced by the iterator, in parallel. Read moresourcefn for_each_with<OP, T>(self, init: T, op: OP)where
OP: Fn(&mut T, Self::Item) + Sync + Send,
T: Send + Clone,
fn for_each_with<OP, T>(self, init: T, op: OP)where
OP: Fn(&mut T, Self::Item) + Sync + Send,
T: Send + Clone,
sourcefn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)where
OP: Fn(&mut T, Self::Item) + Sync + Send,
INIT: Fn() -> T + Sync + Send,
fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)where
OP: Fn(&mut T, Self::Item) + Sync + Send,
INIT: Fn() -> T + Sync + Send,
Executes
OP
on a value returned by init
with each item produced by
the iterator, in parallel. Read moresourcefn try_for_each<OP, R>(self, op: OP) -> Rwhere
OP: Fn(Self::Item) -> R + Sync + Send,
R: Try<Output = ()> + Send,
fn try_for_each<OP, R>(self, op: OP) -> Rwhere
OP: Fn(Self::Item) -> R + Sync + Send,
R: Try<Output = ()> + Send,
Executes a fallible
OP
on each item produced by the iterator, in parallel. Read moresourcefn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> Rwhere
OP: Fn(&mut T, Self::Item) -> R + Sync + Send,
T: Send + Clone,
R: Try<Output = ()> + Send,
fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> Rwhere
OP: Fn(&mut T, Self::Item) -> R + Sync + Send,
T: Send + Clone,
R: Try<Output = ()> + Send,
Executes a fallible
OP
on the given init
value with each item
produced by the iterator, in parallel. Read moresourcefn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> Rwhere
OP: Fn(&mut T, Self::Item) -> R + Sync + Send,
INIT: Fn() -> T + Sync + Send,
R: Try<Output = ()> + Send,
fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> Rwhere
OP: Fn(&mut T, Self::Item) -> R + Sync + Send,
INIT: Fn() -> T + Sync + Send,
R: Try<Output = ()> + Send,
Executes a fallible
OP
on a value returned by init
with each item
produced by the iterator, in parallel. Read moresourcefn map<F, R>(self, map_op: F) -> Map<Self, F>where
F: Fn(Self::Item) -> R + Sync + Send,
R: Send,
fn map<F, R>(self, map_op: F) -> Map<Self, F>where
F: Fn(Self::Item) -> R + Sync + Send,
R: Send,
Applies
map_op
to each item of this iterator, producing a new
iterator with the results. Read moresourcefn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>where
F: Fn(&mut T, Self::Item) -> R + Sync + Send,
T: Send + Clone,
R: Send,
fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>where
F: Fn(&mut T, Self::Item) -> R + Sync + Send,
T: Send + Clone,
R: Send,
Applies
map_op
to the given init
value with each item of this
iterator, producing a new iterator with the results. Read moresourcefn map_init<F, INIT, T, R>(self, init: INIT, map_op: F) -> MapInit<Self, INIT, F>where
F: Fn(&mut T, Self::Item) -> R + Sync + Send,
INIT: Fn() -> T + Sync + Send,
R: Send,
fn map_init<F, INIT, T, R>(self, init: INIT, map_op: F) -> MapInit<Self, INIT, F>where
F: Fn(&mut T, Self::Item) -> R + Sync + Send,
INIT: Fn() -> T + Sync + Send,
R: Send,
Applies
map_op
to a value returned by init
with each item of this
iterator, producing a new iterator with the results. Read moresourcefn cloned<'a, T>(self) -> Cloned<Self>where
T: 'a + Clone + Send,
Self: ParallelIterator<Item = &'a T>,
fn cloned<'a, T>(self) -> Cloned<Self>where
T: 'a + Clone + Send,
Self: ParallelIterator<Item = &'a T>,
sourcefn copied<'a, T>(self) -> Copied<Self>where
T: 'a + Copy + Send,
Self: ParallelIterator<Item = &'a T>,
fn copied<'a, T>(self) -> Copied<Self>where
T: 'a + Copy + Send,
Self: ParallelIterator<Item = &'a T>,
sourcefn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>where
OP: Fn(&Self::Item) + Sync + Send,
fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>where
OP: Fn(&Self::Item) + Sync + Send,
Applies
inspect_op
to a reference to each item of this iterator,
producing a new iterator passing through the original items. This is
often useful for debugging to see what’s happening in iterator stages. Read moresourcefn update<F>(self, update_op: F) -> Update<Self, F>where
F: Fn(&mut Self::Item) + Sync + Send,
fn update<F>(self, update_op: F) -> Update<Self, F>where
F: Fn(&mut Self::Item) + Sync + Send,
Mutates each item of this iterator before yielding it. Read more
sourcefn filter<P>(self, filter_op: P) -> Filter<Self, P>where
P: Fn(&Self::Item) -> bool + Sync + Send,
fn filter<P>(self, filter_op: P) -> Filter<Self, P>where
P: Fn(&Self::Item) -> bool + Sync + Send,
Applies
filter_op
to each item of this iterator, producing a new
iterator with only the items that gave true
results. Read moresourcefn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>where
P: Fn(Self::Item) -> Option<R> + Sync + Send,
R: Send,
fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>where
P: Fn(Self::Item) -> Option<R> + Sync + Send,
R: Send,
Applies
filter_op
to each item of this iterator to get an Option
,
producing a new iterator with only the items from Some
results. Read moresourcefn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>where
F: Fn(Self::Item) -> PI + Sync + Send,
PI: IntoParallelIterator,
fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>where
F: Fn(Self::Item) -> PI + Sync + Send,
PI: IntoParallelIterator,
Applies
map_op
to each item of this iterator to get nested parallel iterators,
producing a new parallel iterator that flattens these back into one. Read moresourcefn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>where
F: Fn(Self::Item) -> SI + Sync + Send,
SI: IntoIterator,
SI::Item: Send,
fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>where
F: Fn(Self::Item) -> SI + Sync + Send,
SI: IntoIterator,
SI::Item: Send,
Applies
map_op
to each item of this iterator to get nested serial iterators,
producing a new parallel iterator that flattens these back into one. Read moresourcefn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Itemwhere
OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,
ID: Fn() -> Self::Item + Sync + Send,
fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Itemwhere
OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,
ID: Fn() -> Self::Item + Sync + Send,
Reduces the items in the iterator into one item using
op
.
The argument identity
should be a closure that can produce
“identity” value which may be inserted into the sequence as
needed to create opportunities for parallel execution. So, for
example, if you are doing a summation, then identity()
ought
to produce something that represents the zero for your type
(but consider just calling sum()
in that case). Read moresourcefn reduce_with<OP>(self, op: OP) -> Option<Self::Item>where
OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,
fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>where
OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,
Reduces the items in the iterator into one item using
op
.
If the iterator is empty, None
is returned; otherwise,
Some
is returned. Read moresourcefn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>where
F: Fn(T, Self::Item) -> T + Sync + Send,
ID: Fn() -> T + Sync + Send,
T: Send,
fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>where
F: Fn(T, Self::Item) -> T + Sync + Send,
ID: Fn() -> T + Sync + Send,
T: Send,
Parallel fold is similar to sequential fold except that the
sequence of items may be subdivided before it is
folded. Consider a list of numbers like
22 3 77 89 46
. If
you used sequential fold to add them (fold(0, |a,b| a+b)
,
you would wind up first adding 0 + 22, then 22 + 3, then 25 +
77, and so forth. The parallel fold works similarly except
that it first breaks up your list into sublists, and hence
instead of yielding up a single sum at the end, it yields up
multiple sums. The number of results is nondeterministic, as
is the point where the breaks occur. Read moresourcefn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>where
F: Fn(T, Self::Item) -> T + Sync + Send,
T: Send + Clone,
fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>where
F: Fn(T, Self::Item) -> T + Sync + Send,
T: Send + Clone,
Applies
fold_op
to the given init
value with each item of this
iterator, finally producing the value for further use. Read moresourcefn try_fold<T, R, ID, F>(
self,
identity: ID,
fold_op: F
) -> TryFold<Self, R, ID, F>where
F: Fn(T, Self::Item) -> R + Sync + Send,
ID: Fn() -> T + Sync + Send,
R: Try<Output = T> + Send,
fn try_fold<T, R, ID, F>(
self,
identity: ID,
fold_op: F
) -> TryFold<Self, R, ID, F>where
F: Fn(T, Self::Item) -> R + Sync + Send,
ID: Fn() -> T + Sync + Send,
R: Try<Output = T> + Send,
Performs a fallible parallel fold. Read more
sourcefn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>where
F: Fn(T, Self::Item) -> R + Sync + Send,
R: Try<Output = T> + Send,
T: Clone + Send,
fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>where
F: Fn(T, Self::Item) -> R + Sync + Send,
R: Try<Output = T> + Send,
T: Clone + Send,
Performs a fallible parallel fold with a cloneable
init
value. Read moresourcefn sum<S>(self) -> Swhere
S: Send + Sum<Self::Item> + Sum<S>,
fn sum<S>(self) -> Swhere
S: Send + Sum<Self::Item> + Sum<S>,
Sums up the items in the iterator. Read more
sourcefn product<P>(self) -> Pwhere
P: Send + Product<Self::Item> + Product<P>,
fn product<P>(self) -> Pwhere
P: Send + Product<Self::Item> + Product<P>,
Multiplies all the items in the iterator. Read more
sourcefn min_by<F>(self, f: F) -> Option<Self::Item>where
F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,
fn min_by<F>(self, f: F) -> Option<Self::Item>where
F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,
Computes the minimum of all the items in the iterator with respect to
the given comparison function. If the iterator is empty,
None
is
returned; otherwise, Some(min)
is returned. Read moresourcefn min_by_key<K, F>(self, f: F) -> Option<Self::Item>where
K: Ord + Send,
F: Sync + Send + Fn(&Self::Item) -> K,
fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>where
K: Ord + Send,
F: Sync + Send + Fn(&Self::Item) -> K,
Computes the item that yields the minimum value for the given
function. If the iterator is empty,
None
is returned;
otherwise, Some(item)
is returned. Read moresourcefn max_by<F>(self, f: F) -> Option<Self::Item>where
F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,
fn max_by<F>(self, f: F) -> Option<Self::Item>where
F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,
Computes the maximum of all the items in the iterator with respect to
the given comparison function. If the iterator is empty,
None
is
returned; otherwise, Some(max)
is returned. Read moresourcefn max_by_key<K, F>(self, f: F) -> Option<Self::Item>where
K: Ord + Send,
F: Sync + Send + Fn(&Self::Item) -> K,
fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>where
K: Ord + Send,
F: Sync + Send + Fn(&Self::Item) -> K,
Computes the item that yields the maximum value for the given
function. If the iterator is empty,
None
is returned;
otherwise, Some(item)
is returned. Read moresourcefn chain<C>(self, chain: C) -> Chain<Self, C::Iter>where
C: IntoParallelIterator<Item = Self::Item>,
fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>where
C: IntoParallelIterator<Item = Self::Item>,
Takes two iterators and creates a new iterator over both. Read more
sourcefn find_any<P>(self, predicate: P) -> Option<Self::Item>where
P: Fn(&Self::Item) -> bool + Sync + Send,
fn find_any<P>(self, predicate: P) -> Option<Self::Item>where
P: Fn(&Self::Item) -> bool + Sync + Send,
Searches for some item in the parallel iterator that
matches the given predicate and returns it. This operation
is similar to
find
on sequential iterators but
the item returned may not be the first one in the parallel
sequence which matches, since we search the entire sequence in parallel. Read moresourcefn find_first<P>(self, predicate: P) -> Option<Self::Item>where
P: Fn(&Self::Item) -> bool + Sync + Send,
fn find_first<P>(self, predicate: P) -> Option<Self::Item>where
P: Fn(&Self::Item) -> bool + Sync + Send,
Searches for the sequentially first item in the parallel iterator
that matches the given predicate and returns it. Read more
sourcefn find_last<P>(self, predicate: P) -> Option<Self::Item>where
P: Fn(&Self::Item) -> bool + Sync + Send,
fn find_last<P>(self, predicate: P) -> Option<Self::Item>where
P: Fn(&Self::Item) -> bool + Sync + Send,
Searches for the sequentially last item in the parallel iterator
that matches the given predicate and returns it. Read more
sourcefn find_map_any<P, R>(self, predicate: P) -> Option<R>where
P: Fn(Self::Item) -> Option<R> + Sync + Send,
R: Send,
fn find_map_any<P, R>(self, predicate: P) -> Option<R>where
P: Fn(Self::Item) -> Option<R> + Sync + Send,
R: Send,
Applies the given predicate to the items in the parallel iterator
and returns any non-None result of the map operation. Read more
sourcefn find_map_first<P, R>(self, predicate: P) -> Option<R>where
P: Fn(Self::Item) -> Option<R> + Sync + Send,
R: Send,
fn find_map_first<P, R>(self, predicate: P) -> Option<R>where
P: Fn(Self::Item) -> Option<R> + Sync + Send,
R: Send,
Applies the given predicate to the items in the parallel iterator and
returns the sequentially first non-None result of the map operation. Read more
sourcefn find_map_last<P, R>(self, predicate: P) -> Option<R>where
P: Fn(Self::Item) -> Option<R> + Sync + Send,
R: Send,
fn find_map_last<P, R>(self, predicate: P) -> Option<R>where
P: Fn(Self::Item) -> Option<R> + Sync + Send,
R: Send,
Applies the given predicate to the items in the parallel iterator and
returns the sequentially last non-None result of the map operation. Read more
sourcefn any<P>(self, predicate: P) -> boolwhere
P: Fn(Self::Item) -> bool + Sync + Send,
fn any<P>(self, predicate: P) -> boolwhere
P: Fn(Self::Item) -> bool + Sync + Send,
Searches for some item in the parallel iterator that
matches the given predicate, and if so returns true. Once
a match is found, we’ll attempt to stop process the rest
of the items. Proving that there’s no match, returning false,
does require visiting every item. Read more
sourcefn all<P>(self, predicate: P) -> boolwhere
P: Fn(Self::Item) -> bool + Sync + Send,
fn all<P>(self, predicate: P) -> boolwhere
P: Fn(Self::Item) -> bool + Sync + Send,
Tests that every item in the parallel iterator matches the given
predicate, and if so returns true. If a counter-example is found,
we’ll attempt to stop processing more items, then return false. Read more
sourcefn while_some<T>(self) -> WhileSome<Self>where
Self: ParallelIterator<Item = Option<T>>,
T: Send,
fn while_some<T>(self) -> WhileSome<Self>where
Self: ParallelIterator<Item = Option<T>>,
T: Send,
Creates an iterator over the
Some
items of this iterator, halting
as soon as any None
is found. Read moresourcefn panic_fuse(self) -> PanicFuse<Self>
fn panic_fuse(self) -> PanicFuse<Self>
Wraps an iterator with a fuse in case of panics, to halt all threads
as soon as possible. Read more
sourcefn collect<C>(self) -> Cwhere
C: FromParallelIterator<Self::Item>,
fn collect<C>(self) -> Cwhere
C: FromParallelIterator<Self::Item>,
Creates a fresh collection containing all the elements produced
by this parallel iterator. Read more
sourcefn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)where
Self: ParallelIterator<Item = (A, B)>,
FromA: Default + Send + ParallelExtend<A>,
FromB: Default + Send + ParallelExtend<B>,
A: Send,
B: Send,
fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)where
Self: ParallelIterator<Item = (A, B)>,
FromA: Default + Send + ParallelExtend<A>,
FromB: Default + Send + ParallelExtend<B>,
A: Send,
B: Send,
Unzips the items of a parallel iterator into a pair of arbitrary
ParallelExtend
containers. Read moresourcefn partition<A, B, P>(self, predicate: P) -> (A, B)where
A: Default + Send + ParallelExtend<Self::Item>,
B: Default + Send + ParallelExtend<Self::Item>,
P: Fn(&Self::Item) -> bool + Sync + Send,
fn partition<A, B, P>(self, predicate: P) -> (A, B)where
A: Default + Send + ParallelExtend<Self::Item>,
B: Default + Send + ParallelExtend<Self::Item>,
P: Fn(&Self::Item) -> bool + Sync + Send,
Partitions the items of a parallel iterator into a pair of arbitrary
ParallelExtend
containers. Items for which the predicate
returns
true go into the first container, and the rest go into the second. Read moresourcefn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)where
A: Default + Send + ParallelExtend<L>,
B: Default + Send + ParallelExtend<R>,
P: Fn(Self::Item) -> Either<L, R> + Sync + Send,
L: Send,
R: Send,
fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)where
A: Default + Send + ParallelExtend<L>,
B: Default + Send + ParallelExtend<R>,
P: Fn(Self::Item) -> Either<L, R> + Sync + Send,
L: Send,
R: Send,
Partitions and maps the items of a parallel iterator into a pair of
arbitrary
ParallelExtend
containers. Either::Left
items go into
the first container, and Either::Right
items go into the second. Read moresourcefn take_any(self, n: usize) -> TakeAny<Self>
fn take_any(self, n: usize) -> TakeAny<Self>
Creates an iterator that yields
n
elements from anywhere in the original iterator. Read moresourcefn skip_any(self, n: usize) -> SkipAny<Self>
fn skip_any(self, n: usize) -> SkipAny<Self>
Creates an iterator that skips
n
elements from anywhere in the original iterator. Read moresourcefn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>where
P: Fn(&Self::Item) -> bool + Sync + Send,
fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>where
P: Fn(&Self::Item) -> bool + Sync + Send,
Creates an iterator that takes elements from anywhere in the original iterator
until the given
predicate
returns false
. Read moresourcefn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>where
P: Fn(&Self::Item) -> bool + Sync + Send,
fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>where
P: Fn(&Self::Item) -> bool + Sync + Send,
Creates an iterator that skips elements from anywhere in the original iterator
until the given
predicate
returns false
. Read moresourcefn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>
fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>
Collects this iterator into a linked list of vectors. Read more
sourceimpl<A, B, C, D, E, F, G, H, I, J, K> ParallelIterator for MultiZip<(A, B, C, D, E, F, G, H, I, J, K)>where
A: IndexedParallelIterator,
B: IndexedParallelIterator,
C: IndexedParallelIterator,
D: IndexedParallelIterator,
E: IndexedParallelIterator,
F: IndexedParallelIterator,
G: IndexedParallelIterator,
H: IndexedParallelIterator,
I: IndexedParallelIterator,
J: IndexedParallelIterator,
K: IndexedParallelIterator,
impl<A, B, C, D, E, F, G, H, I, J, K> ParallelIterator for MultiZip<(A, B, C, D, E, F, G, H, I, J, K)>where
A: IndexedParallelIterator,
B: IndexedParallelIterator,
C: IndexedParallelIterator,
D: IndexedParallelIterator,
E: IndexedParallelIterator,
F: IndexedParallelIterator,
G: IndexedParallelIterator,
H: IndexedParallelIterator,
I: IndexedParallelIterator,
J: IndexedParallelIterator,
K: IndexedParallelIterator,
type Item = (<A as ParallelIterator>::Item, <B as ParallelIterator>::Item, <C as ParallelIterator>::Item, <D as ParallelIterator>::Item, <E as ParallelIterator>::Item, <F as ParallelIterator>::Item, <G as ParallelIterator>::Item, <H as ParallelIterator>::Item, <I as ParallelIterator>::Item, <J as ParallelIterator>::Item, <K as ParallelIterator>::Item)
type Item = (<A as ParallelIterator>::Item, <B as ParallelIterator>::Item, <C as ParallelIterator>::Item, <D as ParallelIterator>::Item, <E as ParallelIterator>::Item, <F as ParallelIterator>::Item, <G as ParallelIterator>::Item, <H as ParallelIterator>::Item, <I as ParallelIterator>::Item, <J as ParallelIterator>::Item, <K as ParallelIterator>::Item)
sourcefn drive_unindexed<CONSUMER>(self, consumer: CONSUMER) -> CONSUMER::Resultwhere
CONSUMER: UnindexedConsumer<Self::Item>,
fn drive_unindexed<CONSUMER>(self, consumer: CONSUMER) -> CONSUMER::Resultwhere
CONSUMER: UnindexedConsumer<Self::Item>,
Internal method used to define the behavior of this parallel
iterator. You should not need to call this directly. Read more
sourcefn opt_len(&self) -> Option<usize>
fn opt_len(&self) -> Option<usize>
Internal method used to define the behavior of this parallel
iterator. You should not need to call this directly. Read more
sourcefn for_each<OP>(self, op: OP)where
OP: Fn(Self::Item) + Sync + Send,
fn for_each<OP>(self, op: OP)where
OP: Fn(Self::Item) + Sync + Send,
Executes
OP
on each item produced by the iterator, in parallel. Read moresourcefn for_each_with<OP, T>(self, init: T, op: OP)where
OP: Fn(&mut T, Self::Item) + Sync + Send,
T: Send + Clone,
fn for_each_with<OP, T>(self, init: T, op: OP)where
OP: Fn(&mut T, Self::Item) + Sync + Send,
T: Send + Clone,
sourcefn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)where
OP: Fn(&mut T, Self::Item) + Sync + Send,
INIT: Fn() -> T + Sync + Send,
fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)where
OP: Fn(&mut T, Self::Item) + Sync + Send,
INIT: Fn() -> T + Sync + Send,
Executes
OP
on a value returned by init
with each item produced by
the iterator, in parallel. Read moresourcefn try_for_each<OP, R>(self, op: OP) -> Rwhere
OP: Fn(Self::Item) -> R + Sync + Send,
R: Try<Output = ()> + Send,
fn try_for_each<OP, R>(self, op: OP) -> Rwhere
OP: Fn(Self::Item) -> R + Sync + Send,
R: Try<Output = ()> + Send,
Executes a fallible
OP
on each item produced by the iterator, in parallel. Read moresourcefn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> Rwhere
OP: Fn(&mut T, Self::Item) -> R + Sync + Send,
T: Send + Clone,
R: Try<Output = ()> + Send,
fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> Rwhere
OP: Fn(&mut T, Self::Item) -> R + Sync + Send,
T: Send + Clone,
R: Try<Output = ()> + Send,
Executes a fallible
OP
on the given init
value with each item
produced by the iterator, in parallel. Read moresourcefn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> Rwhere
OP: Fn(&mut T, Self::Item) -> R + Sync + Send,
INIT: Fn() -> T + Sync + Send,
R: Try<Output = ()> + Send,
fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> Rwhere
OP: Fn(&mut T, Self::Item) -> R + Sync + Send,
INIT: Fn() -> T + Sync + Send,
R: Try<Output = ()> + Send,
Executes a fallible
OP
on a value returned by init
with each item
produced by the iterator, in parallel. Read moresourcefn map<F, R>(self, map_op: F) -> Map<Self, F>where
F: Fn(Self::Item) -> R + Sync + Send,
R: Send,
fn map<F, R>(self, map_op: F) -> Map<Self, F>where
F: Fn(Self::Item) -> R + Sync + Send,
R: Send,
Applies
map_op
to each item of this iterator, producing a new
iterator with the results. Read moresourcefn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>where
F: Fn(&mut T, Self::Item) -> R + Sync + Send,
T: Send + Clone,
R: Send,
fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>where
F: Fn(&mut T, Self::Item) -> R + Sync + Send,
T: Send + Clone,
R: Send,
Applies
map_op
to the given init
value with each item of this
iterator, producing a new iterator with the results. Read moresourcefn map_init<F, INIT, T, R>(self, init: INIT, map_op: F) -> MapInit<Self, INIT, F>where
F: Fn(&mut T, Self::Item) -> R + Sync + Send,
INIT: Fn() -> T + Sync + Send,
R: Send,
fn map_init<F, INIT, T, R>(self, init: INIT, map_op: F) -> MapInit<Self, INIT, F>where
F: Fn(&mut T, Self::Item) -> R + Sync + Send,
INIT: Fn() -> T + Sync + Send,
R: Send,
Applies
map_op
to a value returned by init
with each item of this
iterator, producing a new iterator with the results. Read moresourcefn cloned<'a, T>(self) -> Cloned<Self>where
T: 'a + Clone + Send,
Self: ParallelIterator<Item = &'a T>,
fn cloned<'a, T>(self) -> Cloned<Self>where
T: 'a + Clone + Send,
Self: ParallelIterator<Item = &'a T>,
sourcefn copied<'a, T>(self) -> Copied<Self>where
T: 'a + Copy + Send,
Self: ParallelIterator<Item = &'a T>,
fn copied<'a, T>(self) -> Copied<Self>where
T: 'a + Copy + Send,
Self: ParallelIterator<Item = &'a T>,
sourcefn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>where
OP: Fn(&Self::Item) + Sync + Send,
fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>where
OP: Fn(&Self::Item) + Sync + Send,
Applies
inspect_op
to a reference to each item of this iterator,
producing a new iterator passing through the original items. This is
often useful for debugging to see what’s happening in iterator stages. Read moresourcefn update<F>(self, update_op: F) -> Update<Self, F>where
F: Fn(&mut Self::Item) + Sync + Send,
fn update<F>(self, update_op: F) -> Update<Self, F>where
F: Fn(&mut Self::Item) + Sync + Send,
Mutates each item of this iterator before yielding it. Read more
sourcefn filter<P>(self, filter_op: P) -> Filter<Self, P>where
P: Fn(&Self::Item) -> bool + Sync + Send,
fn filter<P>(self, filter_op: P) -> Filter<Self, P>where
P: Fn(&Self::Item) -> bool + Sync + Send,
Applies
filter_op
to each item of this iterator, producing a new
iterator with only the items that gave true
results. Read moresourcefn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>where
P: Fn(Self::Item) -> Option<R> + Sync + Send,
R: Send,
fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>where
P: Fn(Self::Item) -> Option<R> + Sync + Send,
R: Send,
Applies
filter_op
to each item of this iterator to get an Option
,
producing a new iterator with only the items from Some
results. Read moresourcefn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>where
F: Fn(Self::Item) -> PI + Sync + Send,
PI: IntoParallelIterator,
fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>where
F: Fn(Self::Item) -> PI + Sync + Send,
PI: IntoParallelIterator,
Applies
map_op
to each item of this iterator to get nested parallel iterators,
producing a new parallel iterator that flattens these back into one. Read moresourcefn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>where
F: Fn(Self::Item) -> SI + Sync + Send,
SI: IntoIterator,
SI::Item: Send,
fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>where
F: Fn(Self::Item) -> SI + Sync + Send,
SI: IntoIterator,
SI::Item: Send,
Applies
map_op
to each item of this iterator to get nested serial iterators,
producing a new parallel iterator that flattens these back into one. Read moresourcefn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Itemwhere
OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,
ID: Fn() -> Self::Item + Sync + Send,
fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Itemwhere
OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,
ID: Fn() -> Self::Item + Sync + Send,
Reduces the items in the iterator into one item using
op
.
The argument identity
should be a closure that can produce
“identity” value which may be inserted into the sequence as
needed to create opportunities for parallel execution. So, for
example, if you are doing a summation, then identity()
ought
to produce something that represents the zero for your type
(but consider just calling sum()
in that case). Read moresourcefn reduce_with<OP>(self, op: OP) -> Option<Self::Item>where
OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,
fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>where
OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,
Reduces the items in the iterator into one item using
op
.
If the iterator is empty, None
is returned; otherwise,
Some
is returned. Read moresourcefn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>where
F: Fn(T, Self::Item) -> T + Sync + Send,
ID: Fn() -> T + Sync + Send,
T: Send,
fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>where
F: Fn(T, Self::Item) -> T + Sync + Send,
ID: Fn() -> T + Sync + Send,
T: Send,
Parallel fold is similar to sequential fold except that the
sequence of items may be subdivided before it is
folded. Consider a list of numbers like
22 3 77 89 46
. If
you used sequential fold to add them (fold(0, |a,b| a+b)
,
you would wind up first adding 0 + 22, then 22 + 3, then 25 +
77, and so forth. The parallel fold works similarly except
that it first breaks up your list into sublists, and hence
instead of yielding up a single sum at the end, it yields up
multiple sums. The number of results is nondeterministic, as
is the point where the breaks occur. Read moresourcefn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>where
F: Fn(T, Self::Item) -> T + Sync + Send,
T: Send + Clone,
fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>where
F: Fn(T, Self::Item) -> T + Sync + Send,
T: Send + Clone,
Applies
fold_op
to the given init
value with each item of this
iterator, finally producing the value for further use. Read moresourcefn try_fold<T, R, ID, F>(
self,
identity: ID,
fold_op: F
) -> TryFold<Self, R, ID, F>where
F: Fn(T, Self::Item) -> R + Sync + Send,
ID: Fn() -> T + Sync + Send,
R: Try<Output = T> + Send,
fn try_fold<T, R, ID, F>(
self,
identity: ID,
fold_op: F
) -> TryFold<Self, R, ID, F>where
F: Fn(T, Self::Item) -> R + Sync + Send,
ID: Fn() -> T + Sync + Send,
R: Try<Output = T> + Send,
Performs a fallible parallel fold. Read more
sourcefn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>where
F: Fn(T, Self::Item) -> R + Sync + Send,
R: Try<Output = T> + Send,
T: Clone + Send,
fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>where
F: Fn(T, Self::Item) -> R + Sync + Send,
R: Try<Output = T> + Send,
T: Clone + Send,
Performs a fallible parallel fold with a cloneable
init
value. Read moresourcefn sum<S>(self) -> Swhere
S: Send + Sum<Self::Item> + Sum<S>,
fn sum<S>(self) -> Swhere
S: Send + Sum<Self::Item> + Sum<S>,
Sums up the items in the iterator. Read more
sourcefn product<P>(self) -> Pwhere
P: Send + Product<Self::Item> + Product<P>,
fn product<P>(self) -> Pwhere
P: Send + Product<Self::Item> + Product<P>,
Multiplies all the items in the iterator. Read more
sourcefn min_by<F>(self, f: F) -> Option<Self::Item>where
F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,
fn min_by<F>(self, f: F) -> Option<Self::Item>where
F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,
Computes the minimum of all the items in the iterator with respect to
the given comparison function. If the iterator is empty,
None
is
returned; otherwise, Some(min)
is returned. Read moresourcefn min_by_key<K, F>(self, f: F) -> Option<Self::Item>where
K: Ord + Send,
F: Sync + Send + Fn(&Self::Item) -> K,
fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>where
K: Ord + Send,
F: Sync + Send + Fn(&Self::Item) -> K,
Computes the item that yields the minimum value for the given
function. If the iterator is empty,
None
is returned;
otherwise, Some(item)
is returned. Read moresourcefn max_by<F>(self, f: F) -> Option<Self::Item>where
F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,
fn max_by<F>(self, f: F) -> Option<Self::Item>where
F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,
Computes the maximum of all the items in the iterator with respect to
the given comparison function. If the iterator is empty,
None
is
returned; otherwise, Some(max)
is returned. Read moresourcefn max_by_key<K, F>(self, f: F) -> Option<Self::Item>where
K: Ord + Send,
F: Sync + Send + Fn(&Self::Item) -> K,
fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>where
K: Ord + Send,
F: Sync + Send + Fn(&Self::Item) -> K,
Computes the item that yields the maximum value for the given
function. If the iterator is empty,
None
is returned;
otherwise, Some(item)
is returned. Read moresourcefn chain<C>(self, chain: C) -> Chain<Self, C::Iter>where
C: IntoParallelIterator<Item = Self::Item>,
fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>where
C: IntoParallelIterator<Item = Self::Item>,
Takes two iterators and creates a new iterator over both. Read more
sourcefn find_any<P>(self, predicate: P) -> Option<Self::Item>where
P: Fn(&Self::Item) -> bool + Sync + Send,
fn find_any<P>(self, predicate: P) -> Option<Self::Item>where
P: Fn(&Self::Item) -> bool + Sync + Send,
Searches for some item in the parallel iterator that
matches the given predicate and returns it. This operation
is similar to
find
on sequential iterators but
the item returned may not be the first one in the parallel
sequence which matches, since we search the entire sequence in parallel. Read moresourcefn find_first<P>(self, predicate: P) -> Option<Self::Item>where
P: Fn(&Self::Item) -> bool + Sync + Send,
fn find_first<P>(self, predicate: P) -> Option<Self::Item>where
P: Fn(&Self::Item) -> bool + Sync + Send,
Searches for the sequentially first item in the parallel iterator
that matches the given predicate and returns it. Read more
sourcefn find_last<P>(self, predicate: P) -> Option<Self::Item>where
P: Fn(&Self::Item) -> bool + Sync + Send,
fn find_last<P>(self, predicate: P) -> Option<Self::Item>where
P: Fn(&Self::Item) -> bool + Sync + Send,
Searches for the sequentially last item in the parallel iterator
that matches the given predicate and returns it. Read more
sourcefn find_map_any<P, R>(self, predicate: P) -> Option<R>where
P: Fn(Self::Item) -> Option<R> + Sync + Send,
R: Send,
fn find_map_any<P, R>(self, predicate: P) -> Option<R>where
P: Fn(Self::Item) -> Option<R> + Sync + Send,
R: Send,
Applies the given predicate to the items in the parallel iterator
and returns any non-None result of the map operation. Read more
sourcefn find_map_first<P, R>(self, predicate: P) -> Option<R>where
P: Fn(Self::Item) -> Option<R> + Sync + Send,
R: Send,
fn find_map_first<P, R>(self, predicate: P) -> Option<R>where
P: Fn(Self::Item) -> Option<R> + Sync + Send,
R: Send,
Applies the given predicate to the items in the parallel iterator and
returns the sequentially first non-None result of the map operation. Read more
sourcefn find_map_last<P, R>(self, predicate: P) -> Option<R>where
P: Fn(Self::Item) -> Option<R> + Sync + Send,
R: Send,
fn find_map_last<P, R>(self, predicate: P) -> Option<R>where
P: Fn(Self::Item) -> Option<R> + Sync + Send,
R: Send,
Applies the given predicate to the items in the parallel iterator and
returns the sequentially last non-None result of the map operation. Read more
sourcefn any<P>(self, predicate: P) -> boolwhere
P: Fn(Self::Item) -> bool + Sync + Send,
fn any<P>(self, predicate: P) -> boolwhere
P: Fn(Self::Item) -> bool + Sync + Send,
Searches for some item in the parallel iterator that
matches the given predicate, and if so returns true. Once
a match is found, we’ll attempt to stop process the rest
of the items. Proving that there’s no match, returning false,
does require visiting every item. Read more
sourcefn all<P>(self, predicate: P) -> boolwhere
P: Fn(Self::Item) -> bool + Sync + Send,
fn all<P>(self, predicate: P) -> boolwhere
P: Fn(Self::Item) -> bool + Sync + Send,
Tests that every item in the parallel iterator matches the given
predicate, and if so returns true. If a counter-example is found,
we’ll attempt to stop processing more items, then return false. Read more
sourcefn while_some<T>(self) -> WhileSome<Self>where
Self: ParallelIterator<Item = Option<T>>,
T: Send,
fn while_some<T>(self) -> WhileSome<Self>where
Self: ParallelIterator<Item = Option<T>>,
T: Send,
Creates an iterator over the
Some
items of this iterator, halting
as soon as any None
is found. Read moresourcefn panic_fuse(self) -> PanicFuse<Self>
fn panic_fuse(self) -> PanicFuse<Self>
Wraps an iterator with a fuse in case of panics, to halt all threads
as soon as possible. Read more
sourcefn collect<C>(self) -> Cwhere
C: FromParallelIterator<Self::Item>,
fn collect<C>(self) -> Cwhere
C: FromParallelIterator<Self::Item>,
Creates a fresh collection containing all the elements produced
by this parallel iterator. Read more
sourcefn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)where
Self: ParallelIterator<Item = (A, B)>,
FromA: Default + Send + ParallelExtend<A>,
FromB: Default + Send + ParallelExtend<B>,
A: Send,
B: Send,
fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)where
Self: ParallelIterator<Item = (A, B)>,
FromA: Default + Send + ParallelExtend<A>,
FromB: Default + Send + ParallelExtend<B>,
A: Send,
B: Send,
Unzips the items of a parallel iterator into a pair of arbitrary
ParallelExtend
containers. Read moresourcefn partition<A, B, P>(self, predicate: P) -> (A, B)where
A: Default + Send + ParallelExtend<Self::Item>,
B: Default + Send + ParallelExtend<Self::Item>,
P: Fn(&Self::Item) -> bool + Sync + Send,
fn partition<A, B, P>(self, predicate: P) -> (A, B)where
A: Default + Send + ParallelExtend<Self::Item>,
B: Default + Send + ParallelExtend<Self::Item>,
P: Fn(&Self::Item) -> bool + Sync + Send,
Partitions the items of a parallel iterator into a pair of arbitrary
ParallelExtend
containers. Items for which the predicate
returns
true go into the first container, and the rest go into the second. Read moresourcefn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)where
A: Default + Send + ParallelExtend<L>,
B: Default + Send + ParallelExtend<R>,
P: Fn(Self::Item) -> Either<L, R> + Sync + Send,
L: Send,
R: Send,
fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)where
A: Default + Send + ParallelExtend<L>,
B: Default + Send + ParallelExtend<R>,
P: Fn(Self::Item) -> Either<L, R> + Sync + Send,
L: Send,
R: Send,
Partitions and maps the items of a parallel iterator into a pair of
arbitrary
ParallelExtend
containers. Either::Left
items go into
the first container, and Either::Right
items go into the second. Read moresourcefn take_any(self, n: usize) -> TakeAny<Self>
fn take_any(self, n: usize) -> TakeAny<Self>
Creates an iterator that yields
n
elements from anywhere in the original iterator. Read moresourcefn skip_any(self, n: usize) -> SkipAny<Self>
fn skip_any(self, n: usize) -> SkipAny<Self>
Creates an iterator that skips
n
elements from anywhere in the original iterator. Read moresourcefn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>where
P: Fn(&Self::Item) -> bool + Sync + Send,
fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>where
P: Fn(&Self::Item) -> bool + Sync + Send,
Creates an iterator that takes elements from anywhere in the original iterator
until the given
predicate
returns false
. Read moresourcefn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>where
P: Fn(&Self::Item) -> bool + Sync + Send,
fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>where
P: Fn(&Self::Item) -> bool + Sync + Send,
Creates an iterator that skips elements from anywhere in the original iterator
until the given
predicate
returns false
. Read moresourcefn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>
fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>
Collects this iterator into a linked list of vectors. Read more
sourceimpl<A, B, C, D, E, F, G, H, I, J> ParallelIterator for MultiZip<(A, B, C, D, E, F, G, H, I, J)>where
A: IndexedParallelIterator,
B: IndexedParallelIterator,
C: IndexedParallelIterator,
D: IndexedParallelIterator,
E: IndexedParallelIterator,
F: IndexedParallelIterator,
G: IndexedParallelIterator,
H: IndexedParallelIterator,
I: IndexedParallelIterator,
J: IndexedParallelIterator,
impl<A, B, C, D, E, F, G, H, I, J> ParallelIterator for MultiZip<(A, B, C, D, E, F, G, H, I, J)>where
A: IndexedParallelIterator,
B: IndexedParallelIterator,
C: IndexedParallelIterator,
D: IndexedParallelIterator,
E: IndexedParallelIterator,
F: IndexedParallelIterator,
G: IndexedParallelIterator,
H: IndexedParallelIterator,
I: IndexedParallelIterator,
J: IndexedParallelIterator,
type Item = (<A as ParallelIterator>::Item, <B as ParallelIterator>::Item, <C as ParallelIterator>::Item, <D as ParallelIterator>::Item, <E as ParallelIterator>::Item, <F as ParallelIterator>::Item, <G as ParallelIterator>::Item, <H as ParallelIterator>::Item, <I as ParallelIterator>::Item, <J as ParallelIterator>::Item)
type Item = (<A as ParallelIterator>::Item, <B as ParallelIterator>::Item, <C as ParallelIterator>::Item, <D as ParallelIterator>::Item, <E as ParallelIterator>::Item, <F as ParallelIterator>::Item, <G as ParallelIterator>::Item, <H as ParallelIterator>::Item, <I as ParallelIterator>::Item, <J as ParallelIterator>::Item)
sourcefn drive_unindexed<CONSUMER>(self, consumer: CONSUMER) -> CONSUMER::Resultwhere
CONSUMER: UnindexedConsumer<Self::Item>,
fn drive_unindexed<CONSUMER>(self, consumer: CONSUMER) -> CONSUMER::Resultwhere
CONSUMER: UnindexedConsumer<Self::Item>,
Internal method used to define the behavior of this parallel
iterator. You should not need to call this directly. Read more
sourcefn opt_len(&self) -> Option<usize>
fn opt_len(&self) -> Option<usize>
Internal method used to define the behavior of this parallel
iterator. You should not need to call this directly. Read more
sourcefn for_each<OP>(self, op: OP)where
OP: Fn(Self::Item) + Sync + Send,
fn for_each<OP>(self, op: OP)where
OP: Fn(Self::Item) + Sync + Send,
Executes
OP
on each item produced by the iterator, in parallel. Read moresourcefn for_each_with<OP, T>(self, init: T, op: OP)where
OP: Fn(&mut T, Self::Item) + Sync + Send,
T: Send + Clone,
fn for_each_with<OP, T>(self, init: T, op: OP)where
OP: Fn(&mut T, Self::Item) + Sync + Send,
T: Send + Clone,
sourcefn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)where
OP: Fn(&mut T, Self::Item) + Sync + Send,
INIT: Fn() -> T + Sync + Send,
fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)where
OP: Fn(&mut T, Self::Item) + Sync + Send,
INIT: Fn() -> T + Sync + Send,
Executes
OP
on a value returned by init
with each item produced by
the iterator, in parallel. Read moresourcefn try_for_each<OP, R>(self, op: OP) -> Rwhere
OP: Fn(Self::Item) -> R + Sync + Send,
R: Try<Output = ()> + Send,
fn try_for_each<OP, R>(self, op: OP) -> Rwhere
OP: Fn(Self::Item) -> R + Sync + Send,
R: Try<Output = ()> + Send,
Executes a fallible
OP
on each item produced by the iterator, in parallel. Read moresourcefn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> Rwhere
OP: Fn(&mut T, Self::Item) -> R + Sync + Send,
T: Send + Clone,
R: Try<Output = ()> + Send,
fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> Rwhere
OP: Fn(&mut T, Self::Item) -> R + Sync + Send,
T: Send + Clone,
R: Try<Output = ()> + Send,
Executes a fallible
OP
on the given init
value with each item
produced by the iterator, in parallel. Read moresourcefn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> Rwhere
OP: Fn(&mut T, Self::Item) -> R + Sync + Send,
INIT: Fn() -> T + Sync + Send,
R: Try<Output = ()> + Send,
fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> Rwhere
OP: Fn(&mut T, Self::Item) -> R + Sync + Send,
INIT: Fn() -> T + Sync + Send,
R: Try<Output = ()> + Send,
Executes a fallible
OP
on a value returned by init
with each item
produced by the iterator, in parallel. Read moresourcefn map<F, R>(self, map_op: F) -> Map<Self, F>where
F: Fn(Self::Item) -> R + Sync + Send,
R: Send,
fn map<F, R>(self, map_op: F) -> Map<Self, F>where
F: Fn(Self::Item) -> R + Sync + Send,
R: Send,
Applies
map_op
to each item of this iterator, producing a new
iterator with the results. Read moresourcefn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>where
F: Fn(&mut T, Self::Item) -> R + Sync + Send,
T: Send + Clone,
R: Send,
fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>where
F: Fn(&mut T, Self::Item) -> R + Sync + Send,
T: Send + Clone,
R: Send,
Applies
map_op
to the given init
value with each item of this
iterator, producing a new iterator with the results. Read moresourcefn map_init<F, INIT, T, R>(self, init: INIT, map_op: F) -> MapInit<Self, INIT, F>where
F: Fn(&mut T, Self::Item) -> R + Sync + Send,
INIT: Fn() -> T + Sync + Send,
R: Send,
fn map_init<F, INIT, T, R>(self, init: INIT, map_op: F) -> MapInit<Self, INIT, F>where
F: Fn(&mut T, Self::Item) -> R + Sync + Send,
INIT: Fn() -> T + Sync + Send,
R: Send,
Applies
map_op
to a value returned by init
with each item of this
iterator, producing a new iterator with the results. Read moresourcefn cloned<'a, T>(self) -> Cloned<Self>where
T: 'a + Clone + Send,
Self: ParallelIterator<Item = &'a T>,
fn cloned<'a, T>(self) -> Cloned<Self>where
T: 'a + Clone + Send,
Self: ParallelIterator<Item = &'a T>,
sourcefn copied<'a, T>(self) -> Copied<Self>where
T: 'a + Copy + Send,
Self: ParallelIterator<Item = &'a T>,
fn copied<'a, T>(self) -> Copied<Self>where
T: 'a + Copy + Send,
Self: ParallelIterator<Item = &'a T>,
sourcefn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>where
OP: Fn(&Self::Item) + Sync + Send,
fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>where
OP: Fn(&Self::Item) + Sync + Send,
Applies
inspect_op
to a reference to each item of this iterator,
producing a new iterator passing through the original items. This is
often useful for debugging to see what’s happening in iterator stages. Read moresourcefn update<F>(self, update_op: F) -> Update<Self, F>where
F: Fn(&mut Self::Item) + Sync + Send,
fn update<F>(self, update_op: F) -> Update<Self, F>where
F: Fn(&mut Self::Item) + Sync + Send,
Mutates each item of this iterator before yielding it. Read more
sourcefn filter<P>(self, filter_op: P) -> Filter<Self, P>where
P: Fn(&Self::Item) -> bool + Sync + Send,
fn filter<P>(self, filter_op: P) -> Filter<Self, P>where
P: Fn(&Self::Item) -> bool + Sync + Send,
Applies
filter_op
to each item of this iterator, producing a new
iterator with only the items that gave true
results. Read moresourcefn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>where
P: Fn(Self::Item) -> Option<R> + Sync + Send,
R: Send,
fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>where
P: Fn(Self::Item) -> Option<R> + Sync + Send,
R: Send,
Applies
filter_op
to each item of this iterator to get an Option
,
producing a new iterator with only the items from Some
results. Read moresourcefn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>where
F: Fn(Self::Item) -> PI + Sync + Send,
PI: IntoParallelIterator,
fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>where
F: Fn(Self::Item) -> PI + Sync + Send,
PI: IntoParallelIterator,
Applies
map_op
to each item of this iterator to get nested parallel iterators,
producing a new parallel iterator that flattens these back into one. Read moresourcefn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>where
F: Fn(Self::Item) -> SI + Sync + Send,
SI: IntoIterator,
SI::Item: Send,
fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>where
F: Fn(Self::Item) -> SI + Sync + Send,
SI: IntoIterator,
SI::Item: Send,
Applies
map_op
to each item of this iterator to get nested serial iterators,
producing a new parallel iterator that flattens these back into one. Read moresourcefn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Itemwhere
OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,
ID: Fn() -> Self::Item + Sync + Send,
fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Itemwhere
OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,
ID: Fn() -> Self::Item + Sync + Send,
Reduces the items in the iterator into one item using
op
.
The argument identity
should be a closure that can produce
“identity” value which may be inserted into the sequence as
needed to create opportunities for parallel execution. So, for
example, if you are doing a summation, then identity()
ought
to produce something that represents the zero for your type
(but consider just calling sum()
in that case). Read moresourcefn reduce_with<OP>(self, op: OP) -> Option<Self::Item>where
OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,
fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>where
OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,
Reduces the items in the iterator into one item using
op
.
If the iterator is empty, None
is returned; otherwise,
Some
is returned. Read moresourcefn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>where
F: Fn(T, Self::Item) -> T + Sync + Send,
ID: Fn() -> T + Sync + Send,
T: Send,
fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>where
F: Fn(T, Self::Item) -> T + Sync + Send,
ID: Fn() -> T + Sync + Send,
T: Send,
Parallel fold is similar to sequential fold except that the
sequence of items may be subdivided before it is
folded. Consider a list of numbers like
22 3 77 89 46
. If
you used sequential fold to add them (fold(0, |a,b| a+b)
,
you would wind up first adding 0 + 22, then 22 + 3, then 25 +
77, and so forth. The parallel fold works similarly except
that it first breaks up your list into sublists, and hence
instead of yielding up a single sum at the end, it yields up
multiple sums. The number of results is nondeterministic, as
is the point where the breaks occur. Read moresourcefn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>where
F: Fn(T, Self::Item) -> T + Sync + Send,
T: Send + Clone,
fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>where
F: Fn(T, Self::Item) -> T + Sync + Send,
T: Send + Clone,
Applies
fold_op
to the given init
value with each item of this
iterator, finally producing the value for further use. Read moresourcefn try_fold<T, R, ID, F>(
self,
identity: ID,
fold_op: F
) -> TryFold<Self, R, ID, F>where
F: Fn(T, Self::Item) -> R + Sync + Send,
ID: Fn() -> T + Sync + Send,
R: Try<Output = T> + Send,
fn try_fold<T, R, ID, F>(
self,
identity: ID,
fold_op: F
) -> TryFold<Self, R, ID, F>where
F: Fn(T, Self::Item) -> R + Sync + Send,
ID: Fn() -> T + Sync + Send,
R: Try<Output = T> + Send,
Performs a fallible parallel fold. Read more
sourcefn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>where
F: Fn(T, Self::Item) -> R + Sync + Send,
R: Try<Output = T> + Send,
T: Clone + Send,
fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>where
F: Fn(T, Self::Item) -> R + Sync + Send,
R: Try<Output = T> + Send,
T: Clone + Send,
Performs a fallible parallel fold with a cloneable
init
value. Read moresourcefn sum<S>(self) -> Swhere
S: Send + Sum<Self::Item> + Sum<S>,
fn sum<S>(self) -> Swhere
S: Send + Sum<Self::Item> + Sum<S>,
Sums up the items in the iterator. Read more
sourcefn product<P>(self) -> Pwhere
P: Send + Product<Self::Item> + Product<P>,
fn product<P>(self) -> Pwhere
P: Send + Product<Self::Item> + Product<P>,
Multiplies all the items in the iterator. Read more
sourcefn min_by<F>(self, f: F) -> Option<Self::Item>where
F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,
fn min_by<F>(self, f: F) -> Option<Self::Item>where
F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,
Computes the minimum of all the items in the iterator with respect to
the given comparison function. If the iterator is empty,
None
is
returned; otherwise, Some(min)
is returned. Read moresourcefn min_by_key<K, F>(self, f: F) -> Option<Self::Item>where
K: Ord + Send,
F: Sync + Send + Fn(&Self::Item) -> K,
fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>where
K: Ord + Send,
F: Sync + Send + Fn(&Self::Item) -> K,
Computes the item that yields the minimum value for the given
function. If the iterator is empty,
None
is returned;
otherwise, Some(item)
is returned. Read moresourcefn max_by<F>(self, f: F) -> Option<Self::Item>where
F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,
fn max_by<F>(self, f: F) -> Option<Self::Item>where
F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,
Computes the maximum of all the items in the iterator with respect to
the given comparison function. If the iterator is empty,
None
is
returned; otherwise, Some(max)
is returned. Read moresourcefn max_by_key<K, F>(self, f: F) -> Option<Self::Item>where
K: Ord + Send,
F: Sync + Send + Fn(&Self::Item) -> K,
fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>where
K: Ord + Send,
F: Sync + Send + Fn(&Self::Item) -> K,
Computes the item that yields the maximum value for the given
function. If the iterator is empty,
None
is returned;
otherwise, Some(item)
is returned. Read moresourcefn chain<C>(self, chain: C) -> Chain<Self, C::Iter>where
C: IntoParallelIterator<Item = Self::Item>,
fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>where
C: IntoParallelIterator<Item = Self::Item>,
Takes two iterators and creates a new iterator over both. Read more
sourcefn find_any<P>(self, predicate: P) -> Option<Self::Item>where
P: Fn(&Self::Item) -> bool + Sync + Send,
fn find_any<P>(self, predicate: P) -> Option<Self::Item>where
P: Fn(&Self::Item) -> bool + Sync + Send,
Searches for some item in the parallel iterator that
matches the given predicate and returns it. This operation
is similar to
find
on sequential iterators but
the item returned may not be the first one in the parallel
sequence which matches, since we search the entire sequence in parallel. Read moresourcefn find_first<P>(self, predicate: P) -> Option<Self::Item>where
P: Fn(&Self::Item) -> bool + Sync + Send,
fn find_first<P>(self, predicate: P) -> Option<Self::Item>where
P: Fn(&Self::Item) -> bool + Sync + Send,
Searches for the sequentially first item in the parallel iterator
that matches the given predicate and returns it. Read more
sourcefn find_last<P>(self, predicate: P) -> Option<Self::Item>where
P: Fn(&Self::Item) -> bool + Sync + Send,
fn find_last<P>(self, predicate: P) -> Option<Self::Item>where
P: Fn(&Self::Item) -> bool + Sync + Send,
Searches for the sequentially last item in the parallel iterator
that matches the given predicate and returns it. Read more
sourcefn find_map_any<P, R>(self, predicate: P) -> Option<R>where
P: Fn(Self::Item) -> Option<R> + Sync + Send,
R: Send,
fn find_map_any<P, R>(self, predicate: P) -> Option<R>where
P: Fn(Self::Item) -> Option<R> + Sync + Send,
R: Send,
Applies the given predicate to the items in the parallel iterator
and returns any non-None result of the map operation. Read more
sourcefn find_map_first<P, R>(self, predicate: P) -> Option<R>where
P: Fn(Self::Item) -> Option<R> + Sync + Send,
R: Send,
fn find_map_first<P, R>(self, predicate: P) -> Option<R>where
P: Fn(Self::Item) -> Option<R> + Sync + Send,
R: Send,
Applies the given predicate to the items in the parallel iterator and
returns the sequentially first non-None result of the map operation. Read more
sourcefn find_map_last<P, R>(self, predicate: P) -> Option<R>where
P: Fn(Self::Item) -> Option<R> + Sync + Send,
R: Send,
fn find_map_last<P, R>(self, predicate: P) -> Option<R>where
P: Fn(Self::Item) -> Option<R> + Sync + Send,
R: Send,
Applies the given predicate to the items in the parallel iterator and
returns the sequentially last non-None result of the map operation. Read more
sourcefn any<P>(self, predicate: P) -> boolwhere
P: Fn(Self::Item) -> bool + Sync + Send,
fn any<P>(self, predicate: P) -> boolwhere
P: Fn(Self::Item) -> bool + Sync + Send,
Searches for some item in the parallel iterator that
matches the given predicate, and if so returns true. Once
a match is found, we’ll attempt to stop process the rest
of the items. Proving that there’s no match, returning false,
does require visiting every item. Read more
sourcefn all<P>(self, predicate: P) -> boolwhere
P: Fn(Self::Item) -> bool + Sync + Send,
fn all<P>(self, predicate: P) -> boolwhere
P: Fn(Self::Item) -> bool + Sync + Send,
Tests that every item in the parallel iterator matches the given
predicate, and if so returns true. If a counter-example is found,
we’ll attempt to stop processing more items, then return false. Read more
sourcefn while_some<T>(self) -> WhileSome<Self>where
Self: ParallelIterator<Item = Option<T>>,
T: Send,
fn while_some<T>(self) -> WhileSome<Self>where
Self: ParallelIterator<Item = Option<T>>,
T: Send,
Creates an iterator over the
Some
items of this iterator, halting
as soon as any None
is found. Read moresourcefn panic_fuse(self) -> PanicFuse<Self>
fn panic_fuse(self) -> PanicFuse<Self>
Wraps an iterator with a fuse in case of panics, to halt all threads
as soon as possible. Read more
sourcefn collect<C>(self) -> Cwhere
C: FromParallelIterator<Self::Item>,
fn collect<C>(self) -> Cwhere
C: FromParallelIterator<Self::Item>,
Creates a fresh collection containing all the elements produced
by this parallel iterator. Read more
sourcefn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)where
Self: ParallelIterator<Item = (A, B)>,
FromA: Default + Send + ParallelExtend<A>,
FromB: Default + Send + ParallelExtend<B>,
A: Send,
B: Send,
fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)where
Self: ParallelIterator<Item = (A, B)>,
FromA: Default + Send + ParallelExtend<A>,
FromB: Default + Send + ParallelExtend<B>,
A: Send,
B: Send,
Unzips the items of a parallel iterator into a pair of arbitrary
ParallelExtend
containers. Read moresourcefn partition<A, B, P>(self, predicate: P) -> (A, B)where
A: Default + Send + ParallelExtend<Self::Item>,
B: Default + Send + ParallelExtend<Self::Item>,
P: Fn(&Self::Item) -> bool + Sync + Send,
fn partition<A, B, P>(self, predicate: P) -> (A, B)where
A: Default + Send + ParallelExtend<Self::Item>,
B: Default + Send + ParallelExtend<Self::Item>,
P: Fn(&Self::Item) -> bool + Sync + Send,
Partitions the items of a parallel iterator into a pair of arbitrary
ParallelExtend
containers. Items for which the predicate
returns
true go into the first container, and the rest go into the second. Read moresourcefn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)where
A: Default + Send + ParallelExtend<L>,
B: Default + Send + ParallelExtend<R>,
P: Fn(Self::Item) -> Either<L, R> + Sync + Send,
L: Send,
R: Send,
fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)where
A: Default + Send + ParallelExtend<L>,
B: Default + Send + ParallelExtend<R>,
P: Fn(Self::Item) -> Either<L, R> + Sync + Send,
L: Send,
R: Send,
Partitions and maps the items of a parallel iterator into a pair of
arbitrary
ParallelExtend
containers. Either::Left
items go into
the first container, and Either::Right
items go into the second. Read moresourcefn take_any(self, n: usize) -> TakeAny<Self>
fn take_any(self, n: usize) -> TakeAny<Self>
Creates an iterator that yields
n
elements from anywhere in the original iterator. Read moresourcefn skip_any(self, n: usize) -> SkipAny<Self>
fn skip_any(self, n: usize) -> SkipAny<Self>
Creates an iterator that skips
n
elements from anywhere in the original iterator. Read moresourcefn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>where
P: Fn(&Self::Item) -> bool + Sync + Send,
fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>where
P: Fn(&Self::Item) -> bool + Sync + Send,
Creates an iterator that takes elements from anywhere in the original iterator
until the given
predicate
returns false
. Read moresourcefn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>where
P: Fn(&Self::Item) -> bool + Sync + Send,
fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>where
P: Fn(&Self::Item) -> bool + Sync + Send,
Creates an iterator that skips elements from anywhere in the original iterator
until the given
predicate
returns false
. Read moresourcefn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>
fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>
Collects this iterator into a linked list of vectors. Read more
sourceimpl<A, B, C, D, E, F, G, H, I> ParallelIterator for MultiZip<(A, B, C, D, E, F, G, H, I)>where
A: IndexedParallelIterator,
B: IndexedParallelIterator,
C: IndexedParallelIterator,
D: IndexedParallelIterator,
E: IndexedParallelIterator,
F: IndexedParallelIterator,
G: IndexedParallelIterator,
H: IndexedParallelIterator,
I: IndexedParallelIterator,
impl<A, B, C, D, E, F, G, H, I> ParallelIterator for MultiZip<(A, B, C, D, E, F, G, H, I)>where
A: IndexedParallelIterator,
B: IndexedParallelIterator,
C: IndexedParallelIterator,
D: IndexedParallelIterator,
E: IndexedParallelIterator,
F: IndexedParallelIterator,
G: IndexedParallelIterator,
H: IndexedParallelIterator,
I: IndexedParallelIterator,
type Item = (<A as ParallelIterator>::Item, <B as ParallelIterator>::Item, <C as ParallelIterator>::Item, <D as ParallelIterator>::Item, <E as ParallelIterator>::Item, <F as ParallelIterator>::Item, <G as ParallelIterator>::Item, <H as ParallelIterator>::Item, <I as ParallelIterator>::Item)
type Item = (<A as ParallelIterator>::Item, <B as ParallelIterator>::Item, <C as ParallelIterator>::Item, <D as ParallelIterator>::Item, <E as ParallelIterator>::Item, <F as ParallelIterator>::Item, <G as ParallelIterator>::Item, <H as ParallelIterator>::Item, <I as ParallelIterator>::Item)
sourcefn drive_unindexed<CONSUMER>(self, consumer: CONSUMER) -> CONSUMER::Resultwhere
CONSUMER: UnindexedConsumer<Self::Item>,
fn drive_unindexed<CONSUMER>(self, consumer: CONSUMER) -> CONSUMER::Resultwhere
CONSUMER: UnindexedConsumer<Self::Item>,
Internal method used to define the behavior of this parallel
iterator. You should not need to call this directly. Read more
sourcefn opt_len(&self) -> Option<usize>
fn opt_len(&self) -> Option<usize>
Internal method used to define the behavior of this parallel
iterator. You should not need to call this directly. Read more
sourcefn for_each<OP>(self, op: OP)where
OP: Fn(Self::Item) + Sync + Send,
fn for_each<OP>(self, op: OP)where
OP: Fn(Self::Item) + Sync + Send,
Executes
OP
on each item produced by the iterator, in parallel. Read moresourcefn for_each_with<OP, T>(self, init: T, op: OP)where
OP: Fn(&mut T, Self::Item) + Sync + Send,
T: Send + Clone,
fn for_each_with<OP, T>(self, init: T, op: OP)where
OP: Fn(&mut T, Self::Item) + Sync + Send,
T: Send + Clone,
sourcefn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)where
OP: Fn(&mut T, Self::Item) + Sync + Send,
INIT: Fn() -> T + Sync + Send,
fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)where
OP: Fn(&mut T, Self::Item) + Sync + Send,
INIT: Fn() -> T + Sync + Send,
Executes
OP
on a value returned by init
with each item produced by
the iterator, in parallel. Read moresourcefn try_for_each<OP, R>(self, op: OP) -> Rwhere
OP: Fn(Self::Item) -> R + Sync + Send,
R: Try<Output = ()> + Send,
fn try_for_each<OP, R>(self, op: OP) -> Rwhere
OP: Fn(Self::Item) -> R + Sync + Send,
R: Try<Output = ()> + Send,
Executes a fallible
OP
on each item produced by the iterator, in parallel. Read moresourcefn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> Rwhere
OP: Fn(&mut T, Self::Item) -> R + Sync + Send,
T: Send + Clone,
R: Try<Output = ()> + Send,
fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> Rwhere
OP: Fn(&mut T, Self::Item) -> R + Sync + Send,
T: Send + Clone,
R: Try<Output = ()> + Send,
Executes a fallible
OP
on the given init
value with each item
produced by the iterator, in parallel. Read moresourcefn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> Rwhere
OP: Fn(&mut T, Self::Item) -> R + Sync + Send,
INIT: Fn() -> T + Sync + Send,
R: Try<Output = ()> + Send,
fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> Rwhere
OP: Fn(&mut T, Self::Item) -> R + Sync + Send,
INIT: Fn() -> T + Sync + Send,
R: Try<Output = ()> + Send,
Executes a fallible
OP
on a value returned by init
with each item
produced by the iterator, in parallel. Read moresourcefn map<F, R>(self, map_op: F) -> Map<Self, F>where
F: Fn(Self::Item) -> R + Sync + Send,
R: Send,
fn map<F, R>(self, map_op: F) -> Map<Self, F>where
F: Fn(Self::Item) -> R + Sync + Send,
R: Send,
Applies
map_op
to each item of this iterator, producing a new
iterator with the results. Read moresourcefn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>where
F: Fn(&mut T, Self::Item) -> R + Sync + Send,
T: Send + Clone,
R: Send,
fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>where
F: Fn(&mut T, Self::Item) -> R + Sync + Send,
T: Send + Clone,
R: Send,
Applies
map_op
to the given init
value with each item of this
iterator, producing a new iterator with the results. Read moresourcefn map_init<F, INIT, T, R>(self, init: INIT, map_op: F) -> MapInit<Self, INIT, F>where
F: Fn(&mut T, Self::Item) -> R + Sync + Send,
INIT: Fn() -> T + Sync + Send,
R: Send,
fn map_init<F, INIT, T, R>(self, init: INIT, map_op: F) -> MapInit<Self, INIT, F>where
F: Fn(&mut T, Self::Item) -> R + Sync + Send,
INIT: Fn() -> T + Sync + Send,
R: Send,
Applies
map_op
to a value returned by init
with each item of this
iterator, producing a new iterator with the results. Read moresourcefn cloned<'a, T>(self) -> Cloned<Self>where
T: 'a + Clone + Send,
Self: ParallelIterator<Item = &'a T>,
fn cloned<'a, T>(self) -> Cloned<Self>where
T: 'a + Clone + Send,
Self: ParallelIterator<Item = &'a T>,
sourcefn copied<'a, T>(self) -> Copied<Self>where
T: 'a + Copy + Send,
Self: ParallelIterator<Item = &'a T>,
fn copied<'a, T>(self) -> Copied<Self>where
T: 'a + Copy + Send,
Self: ParallelIterator<Item = &'a T>,
sourcefn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>where
OP: Fn(&Self::Item) + Sync + Send,
fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>where
OP: Fn(&Self::Item) + Sync + Send,
Applies
inspect_op
to a reference to each item of this iterator,
producing a new iterator passing through the original items. This is
often useful for debugging to see what’s happening in iterator stages. Read moresourcefn update<F>(self, update_op: F) -> Update<Self, F>where
F: Fn(&mut Self::Item) + Sync + Send,
fn update<F>(self, update_op: F) -> Update<Self, F>where
F: Fn(&mut Self::Item) + Sync + Send,
Mutates each item of this iterator before yielding it. Read more
sourcefn filter<P>(self, filter_op: P) -> Filter<Self, P>where
P: Fn(&Self::Item) -> bool + Sync + Send,
fn filter<P>(self, filter_op: P) -> Filter<Self, P>where
P: Fn(&Self::Item) -> bool + Sync + Send,
Applies
filter_op
to each item of this iterator, producing a new
iterator with only the items that gave true
results. Read moresourcefn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>where
P: Fn(Self::Item) -> Option<R> + Sync + Send,
R: Send,
fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>where
P: Fn(Self::Item) -> Option<R> + Sync + Send,
R: Send,
Applies
filter_op
to each item of this iterator to get an Option
,
producing a new iterator with only the items from Some
results. Read moresourcefn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>where
F: Fn(Self::Item) -> PI + Sync + Send,
PI: IntoParallelIterator,
fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>where
F: Fn(Self::Item) -> PI + Sync + Send,
PI: IntoParallelIterator,
Applies
map_op
to each item of this iterator to get nested parallel iterators,
producing a new parallel iterator that flattens these back into one. Read moresourcefn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>where
F: Fn(Self::Item) -> SI + Sync + Send,
SI: IntoIterator,
SI::Item: Send,
fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>where
F: Fn(Self::Item) -> SI + Sync + Send,
SI: IntoIterator,
SI::Item: Send,
Applies
map_op
to each item of this iterator to get nested serial iterators,
producing a new parallel iterator that flattens these back into one. Read moresourcefn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Itemwhere
OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,
ID: Fn() -> Self::Item + Sync + Send,
fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Itemwhere
OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,
ID: Fn() -> Self::Item + Sync + Send,
Reduces the items in the iterator into one item using
op
.
The argument identity
should be a closure that can produce
“identity” value which may be inserted into the sequence as
needed to create opportunities for parallel execution. So, for
example, if you are doing a summation, then identity()
ought
to produce something that represents the zero for your type
(but consider just calling sum()
in that case). Read moresourcefn reduce_with<OP>(self, op: OP) -> Option<Self::Item>where
OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,
fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>where
OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,
Reduces the items in the iterator into one item using
op
.
If the iterator is empty, None
is returned; otherwise,
Some
is returned. Read moresourcefn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>where
F: Fn(T, Self::Item) -> T + Sync + Send,
ID: Fn() -> T + Sync + Send,
T: Send,
fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>where
F: Fn(T, Self::Item) -> T + Sync + Send,
ID: Fn() -> T + Sync + Send,
T: Send,
Parallel fold is similar to sequential fold except that the
sequence of items may be subdivided before it is
folded. Consider a list of numbers like
22 3 77 89 46
. If
you used sequential fold to add them (fold(0, |a,b| a+b)
,
you would wind up first adding 0 + 22, then 22 + 3, then 25 +
77, and so forth. The parallel fold works similarly except
that it first breaks up your list into sublists, and hence
instead of yielding up a single sum at the end, it yields up
multiple sums. The number of results is nondeterministic, as
is the point where the breaks occur. Read moresourcefn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>where
F: Fn(T, Self::Item) -> T + Sync + Send,
T: Send + Clone,
fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>where
F: Fn(T, Self::Item) -> T + Sync + Send,
T: Send + Clone,
Applies
fold_op
to the given init
value with each item of this
iterator, finally producing the value for further use. Read moresourcefn try_fold<T, R, ID, F>(
self,
identity: ID,
fold_op: F
) -> TryFold<Self, R, ID, F>where
F: Fn(T, Self::Item) -> R + Sync + Send,
ID: Fn() -> T + Sync + Send,
R: Try<Output = T> + Send,
fn try_fold<T, R, ID, F>(
self,
identity: ID,
fold_op: F
) -> TryFold<Self, R, ID, F>where
F: Fn(T, Self::Item) -> R + Sync + Send,
ID: Fn() -> T + Sync + Send,
R: Try<Output = T> + Send,
Performs a fallible parallel fold. Read more
sourcefn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>where
F: Fn(T, Self::Item) -> R + Sync + Send,
R: Try<Output = T> + Send,
T: Clone + Send,
fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>where
F: Fn(T, Self::Item) -> R + Sync + Send,
R: Try<Output = T> + Send,
T: Clone + Send,
Performs a fallible parallel fold with a cloneable
init
value. Read moresourcefn sum<S>(self) -> Swhere
S: Send + Sum<Self::Item> + Sum<S>,
fn sum<S>(self) -> Swhere
S: Send + Sum<Self::Item> + Sum<S>,
Sums up the items in the iterator. Read more
sourcefn product<P>(self) -> Pwhere
P: Send + Product<Self::Item> + Product<P>,
fn product<P>(self) -> Pwhere
P: Send + Product<Self::Item> + Product<P>,
Multiplies all the items in the iterator. Read more
sourcefn min_by<F>(self, f: F) -> Option<Self::Item>where
F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,
fn min_by<F>(self, f: F) -> Option<Self::Item>where
F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,
Computes the minimum of all the items in the iterator with respect to
the given comparison function. If the iterator is empty,
None
is
returned; otherwise, Some(min)
is returned. Read moresourcefn min_by_key<K, F>(self, f: F) -> Option<Self::Item>where
K: Ord + Send,
F: Sync + Send + Fn(&Self::Item) -> K,
fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>where
K: Ord + Send,
F: Sync + Send + Fn(&Self::Item) -> K,
Computes the item that yields the minimum value for the given
function. If the iterator is empty,
None
is returned;
otherwise, Some(item)
is returned. Read moresourcefn max_by<F>(self, f: F) -> Option<Self::Item>where
F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,
fn max_by<F>(self, f: F) -> Option<Self::Item>where
F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,
Computes the maximum of all the items in the iterator with respect to
the given comparison function. If the iterator is empty,
None
is
returned; otherwise, Some(max)
is returned. Read moresourcefn max_by_key<K, F>(self, f: F) -> Option<Self::Item>where
K: Ord + Send,
F: Sync + Send + Fn(&Self::Item) -> K,
fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>where
K: Ord + Send,
F: Sync + Send + Fn(&Self::Item) -> K,
Computes the item that yields the maximum value for the given
function. If the iterator is empty,
None
is returned;
otherwise, Some(item)
is returned. Read moresourcefn chain<C>(self, chain: C) -> Chain<Self, C::Iter>where
C: IntoParallelIterator<Item = Self::Item>,
fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>where
C: IntoParallelIterator<Item = Self::Item>,
Takes two iterators and creates a new iterator over both. Read more
sourcefn find_any<P>(self, predicate: P) -> Option<Self::Item>where
P: Fn(&Self::Item) -> bool + Sync + Send,
fn find_any<P>(self, predicate: P) -> Option<Self::Item>where
P: Fn(&Self::Item) -> bool + Sync + Send,
Searches for some item in the parallel iterator that
matches the given predicate and returns it. This operation
is similar to
find
on sequential iterators but
the item returned may not be the first one in the parallel
sequence which matches, since we search the entire sequence in parallel. Read moresourcefn find_first<P>(self, predicate: P) -> Option<Self::Item>where
P: Fn(&Self::Item) -> bool + Sync + Send,
fn find_first<P>(self, predicate: P) -> Option<Self::Item>where
P: Fn(&Self::Item) -> bool + Sync + Send,
Searches for the sequentially first item in the parallel iterator
that matches the given predicate and returns it. Read more
sourcefn find_last<P>(self, predicate: P) -> Option<Self::Item>where
P: Fn(&Self::Item) -> bool + Sync + Send,
fn find_last<P>(self, predicate: P) -> Option<Self::Item>where
P: Fn(&Self::Item) -> bool + Sync + Send,
Searches for the sequentially last item in the parallel iterator
that matches the given predicate and returns it. Read more
sourcefn find_map_any<P, R>(self, predicate: P) -> Option<R>where
P: Fn(Self::Item) -> Option<R> + Sync + Send,
R: Send,
fn find_map_any<P, R>(self, predicate: P) -> Option<R>where
P: Fn(Self::Item) -> Option<R> + Sync + Send,
R: Send,
Applies the given predicate to the items in the parallel iterator
and returns any non-None result of the map operation. Read more
sourcefn find_map_first<P, R>(self, predicate: P) -> Option<R>where
P: Fn(Self::Item) -> Option<R> + Sync + Send,
R: Send,
fn find_map_first<P, R>(self, predicate: P) -> Option<R>where
P: Fn(Self::Item) -> Option<R> + Sync + Send,
R: Send,
Applies the given predicate to the items in the parallel iterator and
returns the sequentially first non-None result of the map operation. Read more
sourcefn find_map_last<P, R>(self, predicate: P) -> Option<R>where
P: Fn(Self::Item) -> Option<R> + Sync + Send,
R: Send,
fn find_map_last<P, R>(self, predicate: P) -> Option<R>where
P: Fn(Self::Item) -> Option<R> + Sync + Send,
R: Send,
Applies the given predicate to the items in the parallel iterator and
returns the sequentially last non-None result of the map operation. Read more
sourcefn any<P>(self, predicate: P) -> boolwhere
P: Fn(Self::Item) -> bool + Sync + Send,
fn any<P>(self, predicate: P) -> boolwhere
P: Fn(Self::Item) -> bool + Sync + Send,
Searches for some item in the parallel iterator that
matches the given predicate, and if so returns true. Once
a match is found, we’ll attempt to stop process the rest
of the items. Proving that there’s no match, returning false,
does require visiting every item. Read more
sourcefn all<P>(self, predicate: P) -> boolwhere
P: Fn(Self::Item) -> bool + Sync + Send,
fn all<P>(self, predicate: P) -> boolwhere
P: Fn(Self::Item) -> bool + Sync + Send,
Tests that every item in the parallel iterator matches the given
predicate, and if so returns true. If a counter-example is found,
we’ll attempt to stop processing more items, then return false. Read more
sourcefn while_some<T>(self) -> WhileSome<Self>where
Self: ParallelIterator<Item = Option<T>>,
T: Send,
fn while_some<T>(self) -> WhileSome<Self>where
Self: ParallelIterator<Item = Option<T>>,
T: Send,
Creates an iterator over the
Some
items of this iterator, halting
as soon as any None
is found. Read moresourcefn panic_fuse(self) -> PanicFuse<Self>
fn panic_fuse(self) -> PanicFuse<Self>
Wraps an iterator with a fuse in case of panics, to halt all threads
as soon as possible. Read more
sourcefn collect<C>(self) -> Cwhere
C: FromParallelIterator<Self::Item>,
fn collect<C>(self) -> Cwhere
C: FromParallelIterator<Self::Item>,
Creates a fresh collection containing all the elements produced
by this parallel iterator. Read more
sourcefn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)where
Self: ParallelIterator<Item = (A, B)>,
FromA: Default + Send + ParallelExtend<A>,
FromB: Default + Send + ParallelExtend<B>,
A: Send,
B: Send,
fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)where
Self: ParallelIterator<Item = (A, B)>,
FromA: Default + Send + ParallelExtend<A>,
FromB: Default + Send + ParallelExtend<B>,
A: Send,
B: Send,
Unzips the items of a parallel iterator into a pair of arbitrary
ParallelExtend
containers. Read moresourcefn partition<A, B, P>(self, predicate: P) -> (A, B)where
A: Default + Send + ParallelExtend<Self::Item>,
B: Default + Send + ParallelExtend<Self::Item>,
P: Fn(&Self::Item) -> bool + Sync + Send,
fn partition<A, B, P>(self, predicate: P) -> (A, B)where
A: Default + Send + ParallelExtend<Self::Item>,
B: Default + Send + ParallelExtend<Self::Item>,
P: Fn(&Self::Item) -> bool + Sync + Send,
Partitions the items of a parallel iterator into a pair of arbitrary
ParallelExtend
containers. Items for which the predicate
returns
true go into the first container, and the rest go into the second. Read moresourcefn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)where
A: Default + Send + ParallelExtend<L>,
B: Default + Send + ParallelExtend<R>,
P: Fn(Self::Item) -> Either<L, R> + Sync + Send,
L: Send,
R: Send,
fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)where
A: Default + Send + ParallelExtend<L>,
B: Default + Send + ParallelExtend<R>,
P: Fn(Self::Item) -> Either<L, R> + Sync + Send,
L: Send,
R: Send,
Partitions and maps the items of a parallel iterator into a pair of
arbitrary
ParallelExtend
containers. Either::Left
items go into
the first container, and Either::Right
items go into the second. Read moresourcefn take_any(self, n: usize) -> TakeAny<Self>
fn take_any(self, n: usize) -> TakeAny<Self>
Creates an iterator that yields
n
elements from anywhere in the original iterator. Read moresourcefn skip_any(self, n: usize) -> SkipAny<Self>
fn skip_any(self, n: usize) -> SkipAny<Self>
Creates an iterator that skips
n
elements from anywhere in the original iterator. Read moresourcefn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>where
P: Fn(&Self::Item) -> bool + Sync + Send,
fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>where
P: Fn(&Self::Item) -> bool + Sync + Send,
Creates an iterator that takes elements from anywhere in the original iterator
until the given
predicate
returns false
. Read moresourcefn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>where
P: Fn(&Self::Item) -> bool + Sync + Send,
fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>where
P: Fn(&Self::Item) -> bool + Sync + Send,
Creates an iterator that skips elements from anywhere in the original iterator
until the given
predicate
returns false
. Read moresourcefn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>
fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>
Collects this iterator into a linked list of vectors. Read more
sourceimpl<A, B, C, D, E, F, G, H> ParallelIterator for MultiZip<(A, B, C, D, E, F, G, H)>where
A: IndexedParallelIterator,
B: IndexedParallelIterator,
C: IndexedParallelIterator,
D: IndexedParallelIterator,
E: IndexedParallelIterator,
F: IndexedParallelIterator,
G: IndexedParallelIterator,
H: IndexedParallelIterator,
impl<A, B, C, D, E, F, G, H> ParallelIterator for MultiZip<(A, B, C, D, E, F, G, H)>where
A: IndexedParallelIterator,
B: IndexedParallelIterator,
C: IndexedParallelIterator,
D: IndexedParallelIterator,
E: IndexedParallelIterator,
F: IndexedParallelIterator,
G: IndexedParallelIterator,
H: IndexedParallelIterator,
type Item = (<A as ParallelIterator>::Item, <B as ParallelIterator>::Item, <C as ParallelIterator>::Item, <D as ParallelIterator>::Item, <E as ParallelIterator>::Item, <F as ParallelIterator>::Item, <G as ParallelIterator>::Item, <H as ParallelIterator>::Item)
type Item = (<A as ParallelIterator>::Item, <B as ParallelIterator>::Item, <C as ParallelIterator>::Item, <D as ParallelIterator>::Item, <E as ParallelIterator>::Item, <F as ParallelIterator>::Item, <G as ParallelIterator>::Item, <H as ParallelIterator>::Item)
sourcefn drive_unindexed<CONSUMER>(self, consumer: CONSUMER) -> CONSUMER::Resultwhere
CONSUMER: UnindexedConsumer<Self::Item>,
fn drive_unindexed<CONSUMER>(self, consumer: CONSUMER) -> CONSUMER::Resultwhere
CONSUMER: UnindexedConsumer<Self::Item>,
Internal method used to define the behavior of this parallel
iterator. You should not need to call this directly. Read more
sourcefn opt_len(&self) -> Option<usize>
fn opt_len(&self) -> Option<usize>
Internal method used to define the behavior of this parallel
iterator. You should not need to call this directly. Read more
sourcefn for_each<OP>(self, op: OP)where
OP: Fn(Self::Item) + Sync + Send,
fn for_each<OP>(self, op: OP)where
OP: Fn(Self::Item) + Sync + Send,
Executes
OP
on each item produced by the iterator, in parallel. Read moresourcefn for_each_with<OP, T>(self, init: T, op: OP)where
OP: Fn(&mut T, Self::Item) + Sync + Send,
T: Send + Clone,
fn for_each_with<OP, T>(self, init: T, op: OP)where
OP: Fn(&mut T, Self::Item) + Sync + Send,
T: Send + Clone,
sourcefn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)where
OP: Fn(&mut T, Self::Item) + Sync + Send,
INIT: Fn() -> T + Sync + Send,
fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)where
OP: Fn(&mut T, Self::Item) + Sync + Send,
INIT: Fn() -> T + Sync + Send,
Executes
OP
on a value returned by init
with each item produced by
the iterator, in parallel. Read moresourcefn try_for_each<OP, R>(self, op: OP) -> Rwhere
OP: Fn(Self::Item) -> R + Sync + Send,
R: Try<Output = ()> + Send,
fn try_for_each<OP, R>(self, op: OP) -> Rwhere
OP: Fn(Self::Item) -> R + Sync + Send,
R: Try<Output = ()> + Send,
Executes a fallible
OP
on each item produced by the iterator, in parallel. Read moresourcefn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> Rwhere
OP: Fn(&mut T, Self::Item) -> R + Sync + Send,
T: Send + Clone,
R: Try<Output = ()> + Send,
fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> Rwhere
OP: Fn(&mut T, Self::Item) -> R + Sync + Send,
T: Send + Clone,
R: Try<Output = ()> + Send,
Executes a fallible
OP
on the given init
value with each item
produced by the iterator, in parallel. Read moresourcefn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> Rwhere
OP: Fn(&mut T, Self::Item) -> R + Sync + Send,
INIT: Fn() -> T + Sync + Send,
R: Try<Output = ()> + Send,
fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> Rwhere
OP: Fn(&mut T, Self::Item) -> R + Sync + Send,
INIT: Fn() -> T + Sync + Send,
R: Try<Output = ()> + Send,
Executes a fallible
OP
on a value returned by init
with each item
produced by the iterator, in parallel. Read moresourcefn map<F, R>(self, map_op: F) -> Map<Self, F>where
F: Fn(Self::Item) -> R + Sync + Send,
R: Send,
fn map<F, R>(self, map_op: F) -> Map<Self, F>where
F: Fn(Self::Item) -> R + Sync + Send,
R: Send,
Applies
map_op
to each item of this iterator, producing a new
iterator with the results. Read moresourcefn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>where
F: Fn(&mut T, Self::Item) -> R + Sync + Send,
T: Send + Clone,
R: Send,
fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>where
F: Fn(&mut T, Self::Item) -> R + Sync + Send,
T: Send + Clone,
R: Send,
Applies
map_op
to the given init
value with each item of this
iterator, producing a new iterator with the results. Read moresourcefn map_init<F, INIT, T, R>(self, init: INIT, map_op: F) -> MapInit<Self, INIT, F>where
F: Fn(&mut T, Self::Item) -> R + Sync + Send,
INIT: Fn() -> T + Sync + Send,
R: Send,
fn map_init<F, INIT, T, R>(self, init: INIT, map_op: F) -> MapInit<Self, INIT, F>where
F: Fn(&mut T, Self::Item) -> R + Sync + Send,
INIT: Fn() -> T + Sync + Send,
R: Send,
Applies
map_op
to a value returned by init
with each item of this
iterator, producing a new iterator with the results. Read moresourcefn cloned<'a, T>(self) -> Cloned<Self>where
T: 'a + Clone + Send,
Self: ParallelIterator<Item = &'a T>,
fn cloned<'a, T>(self) -> Cloned<Self>where
T: 'a + Clone + Send,
Self: ParallelIterator<Item = &'a T>,
sourcefn copied<'a, T>(self) -> Copied<Self>where
T: 'a + Copy + Send,
Self: ParallelIterator<Item = &'a T>,
fn copied<'a, T>(self) -> Copied<Self>where
T: 'a + Copy + Send,
Self: ParallelIterator<Item = &'a T>,
sourcefn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>where
OP: Fn(&Self::Item) + Sync + Send,
fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>where
OP: Fn(&Self::Item) + Sync + Send,
Applies
inspect_op
to a reference to each item of this iterator,
producing a new iterator passing through the original items. This is
often useful for debugging to see what’s happening in iterator stages. Read moresourcefn update<F>(self, update_op: F) -> Update<Self, F>where
F: Fn(&mut Self::Item) + Sync + Send,
fn update<F>(self, update_op: F) -> Update<Self, F>where
F: Fn(&mut Self::Item) + Sync + Send,
Mutates each item of this iterator before yielding it. Read more
sourcefn filter<P>(self, filter_op: P) -> Filter<Self, P>where
P: Fn(&Self::Item) -> bool + Sync + Send,
fn filter<P>(self, filter_op: P) -> Filter<Self, P>where
P: Fn(&Self::Item) -> bool + Sync + Send,
Applies
filter_op
to each item of this iterator, producing a new
iterator with only the items that gave true
results. Read moresourcefn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>where
P: Fn(Self::Item) -> Option<R> + Sync + Send,
R: Send,
fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>where
P: Fn(Self::Item) -> Option<R> + Sync + Send,
R: Send,
Applies
filter_op
to each item of this iterator to get an Option
,
producing a new iterator with only the items from Some
results. Read moresourcefn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>where
F: Fn(Self::Item) -> PI + Sync + Send,
PI: IntoParallelIterator,
fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>where
F: Fn(Self::Item) -> PI + Sync + Send,
PI: IntoParallelIterator,
Applies
map_op
to each item of this iterator to get nested parallel iterators,
producing a new parallel iterator that flattens these back into one. Read moresourcefn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>where
F: Fn(Self::Item) -> SI + Sync + Send,
SI: IntoIterator,
SI::Item: Send,
fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>where
F: Fn(Self::Item) -> SI + Sync + Send,
SI: IntoIterator,
SI::Item: Send,
Applies
map_op
to each item of this iterator to get nested serial iterators,
producing a new parallel iterator that flattens these back into one. Read moresourcefn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Itemwhere
OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,
ID: Fn() -> Self::Item + Sync + Send,
fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Itemwhere
OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,
ID: Fn() -> Self::Item + Sync + Send,
Reduces the items in the iterator into one item using
op
.
The argument identity
should be a closure that can produce
“identity” value which may be inserted into the sequence as
needed to create opportunities for parallel execution. So, for
example, if you are doing a summation, then identity()
ought
to produce something that represents the zero for your type
(but consider just calling sum()
in that case). Read moresourcefn reduce_with<OP>(self, op: OP) -> Option<Self::Item>where
OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,
fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>where
OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,
Reduces the items in the iterator into one item using
op
.
If the iterator is empty, None
is returned; otherwise,
Some
is returned. Read moresourcefn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>where
F: Fn(T, Self::Item) -> T + Sync + Send,
ID: Fn() -> T + Sync + Send,
T: Send,
fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>where
F: Fn(T, Self::Item) -> T + Sync + Send,
ID: Fn() -> T + Sync + Send,
T: Send,
Parallel fold is similar to sequential fold except that the
sequence of items may be subdivided before it is
folded. Consider a list of numbers like
22 3 77 89 46
. If
you used sequential fold to add them (fold(0, |a,b| a+b)
,
you would wind up first adding 0 + 22, then 22 + 3, then 25 +
77, and so forth. The parallel fold works similarly except
that it first breaks up your list into sublists, and hence
instead of yielding up a single sum at the end, it yields up
multiple sums. The number of results is nondeterministic, as
is the point where the breaks occur. Read moresourcefn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>where
F: Fn(T, Self::Item) -> T + Sync + Send,
T: Send + Clone,
fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>where
F: Fn(T, Self::Item) -> T + Sync + Send,
T: Send + Clone,
Applies
fold_op
to the given init
value with each item of this
iterator, finally producing the value for further use. Read moresourcefn try_fold<T, R, ID, F>(
self,
identity: ID,
fold_op: F
) -> TryFold<Self, R, ID, F>where
F: Fn(T, Self::Item) -> R + Sync + Send,
ID: Fn() -> T + Sync + Send,
R: Try<Output = T> + Send,
fn try_fold<T, R, ID, F>(
self,
identity: ID,
fold_op: F
) -> TryFold<Self, R, ID, F>where
F: Fn(T, Self::Item) -> R + Sync + Send,
ID: Fn() -> T + Sync + Send,
R: Try<Output = T> + Send,
Performs a fallible parallel fold. Read more
sourcefn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>where
F: Fn(T, Self::Item) -> R + Sync + Send,
R: Try<Output = T> + Send,
T: Clone + Send,
fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>where
F: Fn(T, Self::Item) -> R + Sync + Send,
R: Try<Output = T> + Send,
T: Clone + Send,
Performs a fallible parallel fold with a cloneable
init
value. Read moresourcefn sum<S>(self) -> Swhere
S: Send + Sum<Self::Item> + Sum<S>,
fn sum<S>(self) -> Swhere
S: Send + Sum<Self::Item> + Sum<S>,
Sums up the items in the iterator. Read more
sourcefn product<P>(self) -> Pwhere
P: Send + Product<Self::Item> + Product<P>,
fn product<P>(self) -> Pwhere
P: Send + Product<Self::Item> + Product<P>,
Multiplies all the items in the iterator. Read more
sourcefn min_by<F>(self, f: F) -> Option<Self::Item>where
F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,
fn min_by<F>(self, f: F) -> Option<Self::Item>where
F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,
Computes the minimum of all the items in the iterator with respect to
the given comparison function. If the iterator is empty,
None
is
returned; otherwise, Some(min)
is returned. Read moresourcefn min_by_key<K, F>(self, f: F) -> Option<Self::Item>where
K: Ord + Send,
F: Sync + Send + Fn(&Self::Item) -> K,
fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>where
K: Ord + Send,
F: Sync + Send + Fn(&Self::Item) -> K,
Computes the item that yields the minimum value for the given
function. If the iterator is empty,
None
is returned;
otherwise, Some(item)
is returned. Read moresourcefn max_by<F>(self, f: F) -> Option<Self::Item>where
F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,
fn max_by<F>(self, f: F) -> Option<Self::Item>where
F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,
Computes the maximum of all the items in the iterator with respect to
the given comparison function. If the iterator is empty,
None
is
returned; otherwise, Some(max)
is returned. Read moresourcefn max_by_key<K, F>(self, f: F) -> Option<Self::Item>where
K: Ord + Send,
F: Sync + Send + Fn(&Self::Item) -> K,
fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>where
K: Ord + Send,
F: Sync + Send + Fn(&Self::Item) -> K,
Computes the item that yields the maximum value for the given
function. If the iterator is empty,
None
is returned;
otherwise, Some(item)
is returned. Read moresourcefn chain<C>(self, chain: C) -> Chain<Self, C::Iter>where
C: IntoParallelIterator<Item = Self::Item>,
fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>where
C: IntoParallelIterator<Item = Self::Item>,
Takes two iterators and creates a new iterator over both. Read more
sourcefn find_any<P>(self, predicate: P) -> Option<Self::Item>where
P: Fn(&Self::Item) -> bool + Sync + Send,
fn find_any<P>(self, predicate: P) -> Option<Self::Item>where
P: Fn(&Self::Item) -> bool + Sync + Send,
Searches for some item in the parallel iterator that
matches the given predicate and returns it. This operation
is similar to
find
on sequential iterators but
the item returned may not be the first one in the parallel
sequence which matches, since we search the entire sequence in parallel. Read moresourcefn find_first<P>(self, predicate: P) -> Option<Self::Item>where
P: Fn(&Self::Item) -> bool + Sync + Send,
fn find_first<P>(self, predicate: P) -> Option<Self::Item>where
P: Fn(&Self::Item) -> bool + Sync + Send,
Searches for the sequentially first item in the parallel iterator
that matches the given predicate and returns it. Read more
sourcefn find_last<P>(self, predicate: P) -> Option<Self::Item>where
P: Fn(&Self::Item) -> bool + Sync + Send,
fn find_last<P>(self, predicate: P) -> Option<Self::Item>where
P: Fn(&Self::Item) -> bool + Sync + Send,
Searches for the sequentially last item in the parallel iterator
that matches the given predicate and returns it. Read more
sourcefn find_map_any<P, R>(self, predicate: P) -> Option<R>where
P: Fn(Self::Item) -> Option<R> + Sync + Send,
R: Send,
fn find_map_any<P, R>(self, predicate: P) -> Option<R>where
P: Fn(Self::Item) -> Option<R> + Sync + Send,
R: Send,
Applies the given predicate to the items in the parallel iterator
and returns any non-None result of the map operation. Read more
sourcefn find_map_first<P, R>(self, predicate: P) -> Option<R>where
P: Fn(Self::Item) -> Option<R> + Sync + Send,
R: Send,
fn find_map_first<P, R>(self, predicate: P) -> Option<R>where
P: Fn(Self::Item) -> Option<R> + Sync + Send,
R: Send,
Applies the given predicate to the items in the parallel iterator and
returns the sequentially first non-None result of the map operation. Read more
sourcefn find_map_last<P, R>(self, predicate: P) -> Option<R>where
P: Fn(Self::Item) -> Option<R> + Sync + Send,
R: Send,
fn find_map_last<P, R>(self, predicate: P) -> Option<R>where
P: Fn(Self::Item) -> Option<R> + Sync + Send,
R: Send,
Applies the given predicate to the items in the parallel iterator and
returns the sequentially last non-None result of the map operation. Read more
sourcefn any<P>(self, predicate: P) -> boolwhere
P: Fn(Self::Item) -> bool + Sync + Send,
fn any<P>(self, predicate: P) -> boolwhere
P: Fn(Self::Item) -> bool + Sync + Send,
Searches for some item in the parallel iterator that
matches the given predicate, and if so returns true. Once
a match is found, we’ll attempt to stop process the rest
of the items. Proving that there’s no match, returning false,
does require visiting every item. Read more
sourcefn all<P>(self, predicate: P) -> boolwhere
P: Fn(Self::Item) -> bool + Sync + Send,
fn all<P>(self, predicate: P) -> boolwhere
P: Fn(Self::Item) -> bool + Sync + Send,
Tests that every item in the parallel iterator matches the given
predicate, and if so returns true. If a counter-example is found,
we’ll attempt to stop processing more items, then return false. Read more
sourcefn while_some<T>(self) -> WhileSome<Self>where
Self: ParallelIterator<Item = Option<T>>,
T: Send,
fn while_some<T>(self) -> WhileSome<Self>where
Self: ParallelIterator<Item = Option<T>>,
T: Send,
Creates an iterator over the
Some
items of this iterator, halting
as soon as any None
is found. Read moresourcefn panic_fuse(self) -> PanicFuse<Self>
fn panic_fuse(self) -> PanicFuse<Self>
Wraps an iterator with a fuse in case of panics, to halt all threads
as soon as possible. Read more
sourcefn collect<C>(self) -> Cwhere
C: FromParallelIterator<Self::Item>,
fn collect<C>(self) -> Cwhere
C: FromParallelIterator<Self::Item>,
Creates a fresh collection containing all the elements produced
by this parallel iterator. Read more
sourcefn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)where
Self: ParallelIterator<Item = (A, B)>,
FromA: Default + Send + ParallelExtend<A>,
FromB: Default + Send + ParallelExtend<B>,
A: Send,
B: Send,
fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)where
Self: ParallelIterator<Item = (A, B)>,
FromA: Default + Send + ParallelExtend<A>,
FromB: Default + Send + ParallelExtend<B>,
A: Send,
B: Send,
Unzips the items of a parallel iterator into a pair of arbitrary
ParallelExtend
containers. Read moresourcefn partition<A, B, P>(self, predicate: P) -> (A, B)where
A: Default + Send + ParallelExtend<Self::Item>,
B: Default + Send + ParallelExtend<Self::Item>,
P: Fn(&Self::Item) -> bool + Sync + Send,
fn partition<A, B, P>(self, predicate: P) -> (A, B)where
A: Default + Send + ParallelExtend<Self::Item>,
B: Default + Send + ParallelExtend<Self::Item>,
P: Fn(&Self::Item) -> bool + Sync + Send,
Partitions the items of a parallel iterator into a pair of arbitrary
ParallelExtend
containers. Items for which the predicate
returns
true go into the first container, and the rest go into the second. Read moresourcefn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)where
A: Default + Send + ParallelExtend<L>,
B: Default + Send + ParallelExtend<R>,
P: Fn(Self::Item) -> Either<L, R> + Sync + Send,
L: Send,
R: Send,
fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)where
A: Default + Send + ParallelExtend<L>,
B: Default + Send + ParallelExtend<R>,
P: Fn(Self::Item) -> Either<L, R> + Sync + Send,
L: Send,
R: Send,
Partitions and maps the items of a parallel iterator into a pair of
arbitrary
ParallelExtend
containers. Either::Left
items go into
the first container, and Either::Right
items go into the second. Read moresourcefn take_any(self, n: usize) -> TakeAny<Self>
fn take_any(self, n: usize) -> TakeAny<Self>
Creates an iterator that yields
n
elements from anywhere in the original iterator. Read moresourcefn skip_any(self, n: usize) -> SkipAny<Self>
fn skip_any(self, n: usize) -> SkipAny<Self>
Creates an iterator that skips
n
elements from anywhere in the original iterator. Read moresourcefn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>where
P: Fn(&Self::Item) -> bool + Sync + Send,
fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>where
P: Fn(&Self::Item) -> bool + Sync + Send,
Creates an iterator that takes elements from anywhere in the original iterator
until the given
predicate
returns false
. Read moresourcefn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>where
P: Fn(&Self::Item) -> bool + Sync + Send,
fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>where
P: Fn(&Self::Item) -> bool + Sync + Send,
Creates an iterator that skips elements from anywhere in the original iterator
until the given
predicate
returns false
. Read moresourcefn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>
fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>
Collects this iterator into a linked list of vectors. Read more
sourceimpl<A, B, C, D, E, F, G> ParallelIterator for MultiZip<(A, B, C, D, E, F, G)>where
A: IndexedParallelIterator,
B: IndexedParallelIterator,
C: IndexedParallelIterator,
D: IndexedParallelIterator,
E: IndexedParallelIterator,
F: IndexedParallelIterator,
G: IndexedParallelIterator,
impl<A, B, C, D, E, F, G> ParallelIterator for MultiZip<(A, B, C, D, E, F, G)>where
A: IndexedParallelIterator,
B: IndexedParallelIterator,
C: IndexedParallelIterator,
D: IndexedParallelIterator,
E: IndexedParallelIterator,
F: IndexedParallelIterator,
G: IndexedParallelIterator,
type Item = (<A as ParallelIterator>::Item, <B as ParallelIterator>::Item, <C as ParallelIterator>::Item, <D as ParallelIterator>::Item, <E as ParallelIterator>::Item, <F as ParallelIterator>::Item, <G as ParallelIterator>::Item)
type Item = (<A as ParallelIterator>::Item, <B as ParallelIterator>::Item, <C as ParallelIterator>::Item, <D as ParallelIterator>::Item, <E as ParallelIterator>::Item, <F as ParallelIterator>::Item, <G as ParallelIterator>::Item)
sourcefn drive_unindexed<CONSUMER>(self, consumer: CONSUMER) -> CONSUMER::Resultwhere
CONSUMER: UnindexedConsumer<Self::Item>,
fn drive_unindexed<CONSUMER>(self, consumer: CONSUMER) -> CONSUMER::Resultwhere
CONSUMER: UnindexedConsumer<Self::Item>,
Internal method used to define the behavior of this parallel
iterator. You should not need to call this directly. Read more
sourcefn opt_len(&self) -> Option<usize>
fn opt_len(&self) -> Option<usize>
Internal method used to define the behavior of this parallel
iterator. You should not need to call this directly. Read more
sourcefn for_each<OP>(self, op: OP)where
OP: Fn(Self::Item) + Sync + Send,
fn for_each<OP>(self, op: OP)where
OP: Fn(Self::Item) + Sync + Send,
Executes
OP
on each item produced by the iterator, in parallel. Read moresourcefn for_each_with<OP, T>(self, init: T, op: OP)where
OP: Fn(&mut T, Self::Item) + Sync + Send,
T: Send + Clone,
fn for_each_with<OP, T>(self, init: T, op: OP)where
OP: Fn(&mut T, Self::Item) + Sync + Send,
T: Send + Clone,
sourcefn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)where
OP: Fn(&mut T, Self::Item) + Sync + Send,
INIT: Fn() -> T + Sync + Send,
fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)where
OP: Fn(&mut T, Self::Item) + Sync + Send,
INIT: Fn() -> T + Sync + Send,
Executes
OP
on a value returned by init
with each item produced by
the iterator, in parallel. Read moresourcefn try_for_each<OP, R>(self, op: OP) -> Rwhere
OP: Fn(Self::Item) -> R + Sync + Send,
R: Try<Output = ()> + Send,
fn try_for_each<OP, R>(self, op: OP) -> Rwhere
OP: Fn(Self::Item) -> R + Sync + Send,
R: Try<Output = ()> + Send,
Executes a fallible
OP
on each item produced by the iterator, in parallel. Read moresourcefn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> Rwhere
OP: Fn(&mut T, Self::Item) -> R + Sync + Send,
T: Send + Clone,
R: Try<Output = ()> + Send,
fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> Rwhere
OP: Fn(&mut T, Self::Item) -> R + Sync + Send,
T: Send + Clone,
R: Try<Output = ()> + Send,
Executes a fallible
OP
on the given init
value with each item
produced by the iterator, in parallel. Read moresourcefn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> Rwhere
OP: Fn(&mut T, Self::Item) -> R + Sync + Send,
INIT: Fn() -> T + Sync + Send,
R: Try<Output = ()> + Send,
fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> Rwhere
OP: Fn(&mut T, Self::Item) -> R + Sync + Send,
INIT: Fn() -> T + Sync + Send,
R: Try<Output = ()> + Send,
Executes a fallible
OP
on a value returned by init
with each item
produced by the iterator, in parallel. Read moresourcefn map<F, R>(self, map_op: F) -> Map<Self, F>where
F: Fn(Self::Item) -> R + Sync + Send,
R: Send,
fn map<F, R>(self, map_op: F) -> Map<Self, F>where
F: Fn(Self::Item) -> R + Sync + Send,
R: Send,
Applies
map_op
to each item of this iterator, producing a new
iterator with the results. Read moresourcefn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>where
F: Fn(&mut T, Self::Item) -> R + Sync + Send,
T: Send + Clone,
R: Send,
fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>where
F: Fn(&mut T, Self::Item) -> R + Sync + Send,
T: Send + Clone,
R: Send,
Applies
map_op
to the given init
value with each item of this
iterator, producing a new iterator with the results. Read moresourcefn map_init<F, INIT, T, R>(self, init: INIT, map_op: F) -> MapInit<Self, INIT, F>where
F: Fn(&mut T, Self::Item) -> R + Sync + Send,
INIT: Fn() -> T + Sync + Send,
R: Send,
fn map_init<F, INIT, T, R>(self, init: INIT, map_op: F) -> MapInit<Self, INIT, F>where
F: Fn(&mut T, Self::Item) -> R + Sync + Send,
INIT: Fn() -> T + Sync + Send,
R: Send,
Applies
map_op
to a value returned by init
with each item of this
iterator, producing a new iterator with the results. Read moresourcefn cloned<'a, T>(self) -> Cloned<Self>where
T: 'a + Clone + Send,
Self: ParallelIterator<Item = &'a T>,
fn cloned<'a, T>(self) -> Cloned<Self>where
T: 'a + Clone + Send,
Self: ParallelIterator<Item = &'a T>,
sourcefn copied<'a, T>(self) -> Copied<Self>where
T: 'a + Copy + Send,
Self: ParallelIterator<Item = &'a T>,
fn copied<'a, T>(self) -> Copied<Self>where
T: 'a + Copy + Send,
Self: ParallelIterator<Item = &'a T>,
sourcefn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>where
OP: Fn(&Self::Item) + Sync + Send,
fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>where
OP: Fn(&Self::Item) + Sync + Send,
Applies
inspect_op
to a reference to each item of this iterator,
producing a new iterator passing through the original items. This is
often useful for debugging to see what’s happening in iterator stages. Read moresourcefn update<F>(self, update_op: F) -> Update<Self, F>where
F: Fn(&mut Self::Item) + Sync + Send,
fn update<F>(self, update_op: F) -> Update<Self, F>where
F: Fn(&mut Self::Item) + Sync + Send,
Mutates each item of this iterator before yielding it. Read more
sourcefn filter<P>(self, filter_op: P) -> Filter<Self, P>where
P: Fn(&Self::Item) -> bool + Sync + Send,
fn filter<P>(self, filter_op: P) -> Filter<Self, P>where
P: Fn(&Self::Item) -> bool + Sync + Send,
Applies
filter_op
to each item of this iterator, producing a new
iterator with only the items that gave true
results. Read moresourcefn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>where
P: Fn(Self::Item) -> Option<R> + Sync + Send,
R: Send,
fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>where
P: Fn(Self::Item) -> Option<R> + Sync + Send,
R: Send,
Applies
filter_op
to each item of this iterator to get an Option
,
producing a new iterator with only the items from Some
results. Read moresourcefn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>where
F: Fn(Self::Item) -> PI + Sync + Send,
PI: IntoParallelIterator,
fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>where
F: Fn(Self::Item) -> PI + Sync + Send,
PI: IntoParallelIterator,
Applies
map_op
to each item of this iterator to get nested parallel iterators,
producing a new parallel iterator that flattens these back into one. Read moresourcefn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>where
F: Fn(Self::Item) -> SI + Sync + Send,
SI: IntoIterator,
SI::Item: Send,
fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>where
F: Fn(Self::Item) -> SI + Sync + Send,
SI: IntoIterator,
SI::Item: Send,
Applies
map_op
to each item of this iterator to get nested serial iterators,
producing a new parallel iterator that flattens these back into one. Read moresourcefn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Itemwhere
OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,
ID: Fn() -> Self::Item + Sync + Send,
fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Itemwhere
OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,
ID: Fn() -> Self::Item + Sync + Send,
Reduces the items in the iterator into one item using
op
.
The argument identity
should be a closure that can produce
“identity” value which may be inserted into the sequence as
needed to create opportunities for parallel execution. So, for
example, if you are doing a summation, then identity()
ought
to produce something that represents the zero for your type
(but consider just calling sum()
in that case). Read moresourcefn reduce_with<OP>(self, op: OP) -> Option<Self::Item>where
OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,
fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>where
OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,
Reduces the items in the iterator into one item using
op
.
If the iterator is empty, None
is returned; otherwise,
Some
is returned. Read moresourcefn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>where
F: Fn(T, Self::Item) -> T + Sync + Send,
ID: Fn() -> T + Sync + Send,
T: Send,
fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>where
F: Fn(T, Self::Item) -> T + Sync + Send,
ID: Fn() -> T + Sync + Send,
T: Send,
Parallel fold is similar to sequential fold except that the
sequence of items may be subdivided before it is
folded. Consider a list of numbers like
22 3 77 89 46
. If
you used sequential fold to add them (fold(0, |a,b| a+b)
,
you would wind up first adding 0 + 22, then 22 + 3, then 25 +
77, and so forth. The parallel fold works similarly except
that it first breaks up your list into sublists, and hence
instead of yielding up a single sum at the end, it yields up
multiple sums. The number of results is nondeterministic, as
is the point where the breaks occur. Read moresourcefn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>where
F: Fn(T, Self::Item) -> T + Sync + Send,
T: Send + Clone,
fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>where
F: Fn(T, Self::Item) -> T + Sync + Send,
T: Send + Clone,
Applies
fold_op
to the given init
value with each item of this
iterator, finally producing the value for further use. Read moresourcefn try_fold<T, R, ID, F>(
self,
identity: ID,
fold_op: F
) -> TryFold<Self, R, ID, F>where
F: Fn(T, Self::Item) -> R + Sync + Send,
ID: Fn() -> T + Sync + Send,
R: Try<Output = T> + Send,
fn try_fold<T, R, ID, F>(
self,
identity: ID,
fold_op: F
) -> TryFold<Self, R, ID, F>where
F: Fn(T, Self::Item) -> R + Sync + Send,
ID: Fn() -> T + Sync + Send,
R: Try<Output = T> + Send,
Performs a fallible parallel fold. Read more
sourcefn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>where
F: Fn(T, Self::Item) -> R + Sync + Send,
R: Try<Output = T> + Send,
T: Clone + Send,
fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>where
F: Fn(T, Self::Item) -> R + Sync + Send,
R: Try<Output = T> + Send,
T: Clone + Send,
Performs a fallible parallel fold with a cloneable
init
value. Read moresourcefn sum<S>(self) -> Swhere
S: Send + Sum<Self::Item> + Sum<S>,
fn sum<S>(self) -> Swhere
S: Send + Sum<Self::Item> + Sum<S>,
Sums up the items in the iterator. Read more
sourcefn product<P>(self) -> Pwhere
P: Send + Product<Self::Item> + Product<P>,
fn product<P>(self) -> Pwhere
P: Send + Product<Self::Item> + Product<P>,
Multiplies all the items in the iterator. Read more
sourcefn min_by<F>(self, f: F) -> Option<Self::Item>where
F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,
fn min_by<F>(self, f: F) -> Option<Self::Item>where
F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,
Computes the minimum of all the items in the iterator with respect to
the given comparison function. If the iterator is empty,
None
is
returned; otherwise, Some(min)
is returned. Read moresourcefn min_by_key<K, F>(self, f: F) -> Option<Self::Item>where
K: Ord + Send,
F: Sync + Send + Fn(&Self::Item) -> K,
fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>where
K: Ord + Send,
F: Sync + Send + Fn(&Self::Item) -> K,
Computes the item that yields the minimum value for the given
function. If the iterator is empty,
None
is returned;
otherwise, Some(item)
is returned. Read moresourcefn max_by<F>(self, f: F) -> Option<Self::Item>where
F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,
fn max_by<F>(self, f: F) -> Option<Self::Item>where
F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,
Computes the maximum of all the items in the iterator with respect to
the given comparison function. If the iterator is empty,
None
is
returned; otherwise, Some(max)
is returned. Read moresourcefn max_by_key<K, F>(self, f: F) -> Option<Self::Item>where
K: Ord + Send,
F: Sync + Send + Fn(&Self::Item) -> K,
fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>where
K: Ord + Send,
F: Sync + Send + Fn(&Self::Item) -> K,
Computes the item that yields the maximum value for the given
function. If the iterator is empty,
None
is returned;
otherwise, Some(item)
is returned. Read moresourcefn chain<C>(self, chain: C) -> Chain<Self, C::Iter>where
C: IntoParallelIterator<Item = Self::Item>,
fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>where
C: IntoParallelIterator<Item = Self::Item>,
Takes two iterators and creates a new iterator over both. Read more
sourcefn find_any<P>(self, predicate: P) -> Option<Self::Item>where
P: Fn(&Self::Item) -> bool + Sync + Send,
fn find_any<P>(self, predicate: P) -> Option<Self::Item>where
P: Fn(&Self::Item) -> bool + Sync + Send,
Searches for some item in the parallel iterator that
matches the given predicate and returns it. This operation
is similar to
find
on sequential iterators but
the item returned may not be the first one in the parallel
sequence which matches, since we search the entire sequence in parallel. Read moresourcefn find_first<P>(self, predicate: P) -> Option<Self::Item>where
P: Fn(&Self::Item) -> bool + Sync + Send,
fn find_first<P>(self, predicate: P) -> Option<Self::Item>where
P: Fn(&Self::Item) -> bool + Sync + Send,
Searches for the sequentially first item in the parallel iterator
that matches the given predicate and returns it. Read more
sourcefn find_last<P>(self, predicate: P) -> Option<Self::Item>where
P: Fn(&Self::Item) -> bool + Sync + Send,
fn find_last<P>(self, predicate: P) -> Option<Self::Item>where
P: Fn(&Self::Item) -> bool + Sync + Send,
Searches for the sequentially last item in the parallel iterator
that matches the given predicate and returns it. Read more
sourcefn find_map_any<P, R>(self, predicate: P) -> Option<R>where
P: Fn(Self::Item) -> Option<R> + Sync + Send,
R: Send,
fn find_map_any<P, R>(self, predicate: P) -> Option<R>where
P: Fn(Self::Item) -> Option<R> + Sync + Send,
R: Send,
Applies the given predicate to the items in the parallel iterator
and returns any non-None result of the map operation. Read more
sourcefn find_map_first<P, R>(self, predicate: P) -> Option<R>where
P: Fn(Self::Item) -> Option<R> + Sync + Send,
R: Send,
fn find_map_first<P, R>(self, predicate: P) -> Option<R>where
P: Fn(Self::Item) -> Option<R> + Sync + Send,
R: Send,
Applies the given predicate to the items in the parallel iterator and
returns the sequentially first non-None result of the map operation. Read more
sourcefn find_map_last<P, R>(self, predicate: P) -> Option<R>where
P: Fn(Self::Item) -> Option<R> + Sync + Send,
R: Send,
fn find_map_last<P, R>(self, predicate: P) -> Option<R>where
P: Fn(Self::Item) -> Option<R> + Sync + Send,
R: Send,
Applies the given predicate to the items in the parallel iterator and
returns the sequentially last non-None result of the map operation. Read more
sourcefn any<P>(self, predicate: P) -> boolwhere
P: Fn(Self::Item) -> bool + Sync + Send,
fn any<P>(self, predicate: P) -> boolwhere
P: Fn(Self::Item) -> bool + Sync + Send,
Searches for some item in the parallel iterator that
matches the given predicate, and if so returns true. Once
a match is found, we’ll attempt to stop process the rest
of the items. Proving that there’s no match, returning false,
does require visiting every item. Read more
sourcefn all<P>(self, predicate: P) -> boolwhere
P: Fn(Self::Item) -> bool + Sync + Send,
fn all<P>(self, predicate: P) -> boolwhere
P: Fn(Self::Item) -> bool + Sync + Send,
Tests that every item in the parallel iterator matches the given
predicate, and if so returns true. If a counter-example is found,
we’ll attempt to stop processing more items, then return false. Read more
sourcefn while_some<T>(self) -> WhileSome<Self>where
Self: ParallelIterator<Item = Option<T>>,
T: Send,
fn while_some<T>(self) -> WhileSome<Self>where
Self: ParallelIterator<Item = Option<T>>,
T: Send,
Creates an iterator over the
Some
items of this iterator, halting
as soon as any None
is found. Read moresourcefn panic_fuse(self) -> PanicFuse<Self>
fn panic_fuse(self) -> PanicFuse<Self>
Wraps an iterator with a fuse in case of panics, to halt all threads
as soon as possible. Read more
sourcefn collect<C>(self) -> Cwhere
C: FromParallelIterator<Self::Item>,
fn collect<C>(self) -> Cwhere
C: FromParallelIterator<Self::Item>,
Creates a fresh collection containing all the elements produced
by this parallel iterator. Read more
sourcefn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)where
Self: ParallelIterator<Item = (A, B)>,
FromA: Default + Send + ParallelExtend<A>,
FromB: Default + Send + ParallelExtend<B>,
A: Send,
B: Send,
fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)where
Self: ParallelIterator<Item = (A, B)>,
FromA: Default + Send + ParallelExtend<A>,
FromB: Default + Send + ParallelExtend<B>,
A: Send,
B: Send,
Unzips the items of a parallel iterator into a pair of arbitrary
ParallelExtend
containers. Read moresourcefn partition<A, B, P>(self, predicate: P) -> (A, B)where
A: Default + Send + ParallelExtend<Self::Item>,
B: Default + Send + ParallelExtend<Self::Item>,
P: Fn(&Self::Item) -> bool + Sync + Send,
fn partition<A, B, P>(self, predicate: P) -> (A, B)where
A: Default + Send + ParallelExtend<Self::Item>,
B: Default + Send + ParallelExtend<Self::Item>,
P: Fn(&Self::Item) -> bool + Sync + Send,
Partitions the items of a parallel iterator into a pair of arbitrary
ParallelExtend
containers. Items for which the predicate
returns
true go into the first container, and the rest go into the second. Read moresourcefn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)where
A: Default + Send + ParallelExtend<L>,
B: Default + Send + ParallelExtend<R>,
P: Fn(Self::Item) -> Either<L, R> + Sync + Send,
L: Send,
R: Send,
fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)where
A: Default + Send + ParallelExtend<L>,
B: Default + Send + ParallelExtend<R>,
P: Fn(Self::Item) -> Either<L, R> + Sync + Send,
L: Send,
R: Send,
Partitions and maps the items of a parallel iterator into a pair of
arbitrary
ParallelExtend
containers. Either::Left
items go into
the first container, and Either::Right
items go into the second. Read moresourcefn take_any(self, n: usize) -> TakeAny<Self>
fn take_any(self, n: usize) -> TakeAny<Self>
Creates an iterator that yields
n
elements from anywhere in the original iterator. Read moresourcefn skip_any(self, n: usize) -> SkipAny<Self>
fn skip_any(self, n: usize) -> SkipAny<Self>
Creates an iterator that skips
n
elements from anywhere in the original iterator. Read moresourcefn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>where
P: Fn(&Self::Item) -> bool + Sync + Send,
fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>where
P: Fn(&Self::Item) -> bool + Sync + Send,
Creates an iterator that takes elements from anywhere in the original iterator
until the given
predicate
returns false
. Read moresourcefn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>where
P: Fn(&Self::Item) -> bool + Sync + Send,
fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>where
P: Fn(&Self::Item) -> bool + Sync + Send,
Creates an iterator that skips elements from anywhere in the original iterator
until the given
predicate
returns false
. Read moresourcefn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>
fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>
Collects this iterator into a linked list of vectors. Read more
sourceimpl<A, B, C, D, E, F> ParallelIterator for MultiZip<(A, B, C, D, E, F)>where
A: IndexedParallelIterator,
B: IndexedParallelIterator,
C: IndexedParallelIterator,
D: IndexedParallelIterator,
E: IndexedParallelIterator,
F: IndexedParallelIterator,
impl<A, B, C, D, E, F> ParallelIterator for MultiZip<(A, B, C, D, E, F)>where
A: IndexedParallelIterator,
B: IndexedParallelIterator,
C: IndexedParallelIterator,
D: IndexedParallelIterator,
E: IndexedParallelIterator,
F: IndexedParallelIterator,
type Item = (<A as ParallelIterator>::Item, <B as ParallelIterator>::Item, <C as ParallelIterator>::Item, <D as ParallelIterator>::Item, <E as ParallelIterator>::Item, <F as ParallelIterator>::Item)
type Item = (<A as ParallelIterator>::Item, <B as ParallelIterator>::Item, <C as ParallelIterator>::Item, <D as ParallelIterator>::Item, <E as ParallelIterator>::Item, <F as ParallelIterator>::Item)
sourcefn drive_unindexed<CONSUMER>(self, consumer: CONSUMER) -> CONSUMER::Resultwhere
CONSUMER: UnindexedConsumer<Self::Item>,
fn drive_unindexed<CONSUMER>(self, consumer: CONSUMER) -> CONSUMER::Resultwhere
CONSUMER: UnindexedConsumer<Self::Item>,
Internal method used to define the behavior of this parallel
iterator. You should not need to call this directly. Read more
sourcefn opt_len(&self) -> Option<usize>
fn opt_len(&self) -> Option<usize>
Internal method used to define the behavior of this parallel
iterator. You should not need to call this directly. Read more
sourcefn for_each<OP>(self, op: OP)where
OP: Fn(Self::Item) + Sync + Send,
fn for_each<OP>(self, op: OP)where
OP: Fn(Self::Item) + Sync + Send,
Executes
OP
on each item produced by the iterator, in parallel. Read moresourcefn for_each_with<OP, T>(self, init: T, op: OP)where
OP: Fn(&mut T, Self::Item) + Sync + Send,
T: Send + Clone,
fn for_each_with<OP, T>(self, init: T, op: OP)where
OP: Fn(&mut T, Self::Item) + Sync + Send,
T: Send + Clone,
sourcefn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)where
OP: Fn(&mut T, Self::Item) + Sync + Send,
INIT: Fn() -> T + Sync + Send,
fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)where
OP: Fn(&mut T, Self::Item) + Sync + Send,
INIT: Fn() -> T + Sync + Send,
Executes
OP
on a value returned by init
with each item produced by
the iterator, in parallel. Read moresourcefn try_for_each<OP, R>(self, op: OP) -> Rwhere
OP: Fn(Self::Item) -> R + Sync + Send,
R: Try<Output = ()> + Send,
fn try_for_each<OP, R>(self, op: OP) -> Rwhere
OP: Fn(Self::Item) -> R + Sync + Send,
R: Try<Output = ()> + Send,
Executes a fallible
OP
on each item produced by the iterator, in parallel. Read moresourcefn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> Rwhere
OP: Fn(&mut T, Self::Item) -> R + Sync + Send,
T: Send + Clone,
R: Try<Output = ()> + Send,
fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> Rwhere
OP: Fn(&mut T, Self::Item) -> R + Sync + Send,
T: Send + Clone,
R: Try<Output = ()> + Send,
Executes a fallible
OP
on the given init
value with each item
produced by the iterator, in parallel. Read moresourcefn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> Rwhere
OP: Fn(&mut T, Self::Item) -> R + Sync + Send,
INIT: Fn() -> T + Sync + Send,
R: Try<Output = ()> + Send,
fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> Rwhere
OP: Fn(&mut T, Self::Item) -> R + Sync + Send,
INIT: Fn() -> T + Sync + Send,
R: Try<Output = ()> + Send,
Executes a fallible
OP
on a value returned by init
with each item
produced by the iterator, in parallel. Read moresourcefn map<F, R>(self, map_op: F) -> Map<Self, F>where
F: Fn(Self::Item) -> R + Sync + Send,
R: Send,
fn map<F, R>(self, map_op: F) -> Map<Self, F>where
F: Fn(Self::Item) -> R + Sync + Send,
R: Send,
Applies
map_op
to each item of this iterator, producing a new
iterator with the results. Read moresourcefn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>where
F: Fn(&mut T, Self::Item) -> R + Sync + Send,
T: Send + Clone,
R: Send,
fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>where
F: Fn(&mut T, Self::Item) -> R + Sync + Send,
T: Send + Clone,
R: Send,
Applies
map_op
to the given init
value with each item of this
iterator, producing a new iterator with the results. Read moresourcefn map_init<F, INIT, T, R>(self, init: INIT, map_op: F) -> MapInit<Self, INIT, F>where
F: Fn(&mut T, Self::Item) -> R + Sync + Send,
INIT: Fn() -> T + Sync + Send,
R: Send,
fn map_init<F, INIT, T, R>(self, init: INIT, map_op: F) -> MapInit<Self, INIT, F>where
F: Fn(&mut T, Self::Item) -> R + Sync + Send,
INIT: Fn() -> T + Sync + Send,
R: Send,
Applies
map_op
to a value returned by init
with each item of this
iterator, producing a new iterator with the results. Read moresourcefn cloned<'a, T>(self) -> Cloned<Self>where
T: 'a + Clone + Send,
Self: ParallelIterator<Item = &'a T>,
fn cloned<'a, T>(self) -> Cloned<Self>where
T: 'a + Clone + Send,
Self: ParallelIterator<Item = &'a T>,
sourcefn copied<'a, T>(self) -> Copied<Self>where
T: 'a + Copy + Send,
Self: ParallelIterator<Item = &'a T>,
fn copied<'a, T>(self) -> Copied<Self>where
T: 'a + Copy + Send,
Self: ParallelIterator<Item = &'a T>,
sourcefn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>where
OP: Fn(&Self::Item) + Sync + Send,
fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>where
OP: Fn(&Self::Item) + Sync + Send,
Applies
inspect_op
to a reference to each item of this iterator,
producing a new iterator passing through the original items. This is
often useful for debugging to see what’s happening in iterator stages. Read moresourcefn update<F>(self, update_op: F) -> Update<Self, F>where
F: Fn(&mut Self::Item) + Sync + Send,
fn update<F>(self, update_op: F) -> Update<Self, F>where
F: Fn(&mut Self::Item) + Sync + Send,
Mutates each item of this iterator before yielding it. Read more
sourcefn filter<P>(self, filter_op: P) -> Filter<Self, P>where
P: Fn(&Self::Item) -> bool + Sync + Send,
fn filter<P>(self, filter_op: P) -> Filter<Self, P>where
P: Fn(&Self::Item) -> bool + Sync + Send,
Applies
filter_op
to each item of this iterator, producing a new
iterator with only the items that gave true
results. Read moresourcefn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>where
P: Fn(Self::Item) -> Option<R> + Sync + Send,
R: Send,
fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>where
P: Fn(Self::Item) -> Option<R> + Sync + Send,
R: Send,
Applies
filter_op
to each item of this iterator to get an Option
,
producing a new iterator with only the items from Some
results. Read moresourcefn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>where
F: Fn(Self::Item) -> PI + Sync + Send,
PI: IntoParallelIterator,
fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>where
F: Fn(Self::Item) -> PI + Sync + Send,
PI: IntoParallelIterator,
Applies
map_op
to each item of this iterator to get nested parallel iterators,
producing a new parallel iterator that flattens these back into one. Read moresourcefn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>where
F: Fn(Self::Item) -> SI + Sync + Send,
SI: IntoIterator,
SI::Item: Send,
fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>where
F: Fn(Self::Item) -> SI + Sync + Send,
SI: IntoIterator,
SI::Item: Send,
Applies
map_op
to each item of this iterator to get nested serial iterators,
producing a new parallel iterator that flattens these back into one. Read moresourcefn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Itemwhere
OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,
ID: Fn() -> Self::Item + Sync + Send,
fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Itemwhere
OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,
ID: Fn() -> Self::Item + Sync + Send,
Reduces the items in the iterator into one item using
op
.
The argument identity
should be a closure that can produce
“identity” value which may be inserted into the sequence as
needed to create opportunities for parallel execution. So, for
example, if you are doing a summation, then identity()
ought
to produce something that represents the zero for your type
(but consider just calling sum()
in that case). Read moresourcefn reduce_with<OP>(self, op: OP) -> Option<Self::Item>where
OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,
fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>where
OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,
Reduces the items in the iterator into one item using
op
.
If the iterator is empty, None
is returned; otherwise,
Some
is returned. Read moresourcefn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>where
F: Fn(T, Self::Item) -> T + Sync + Send,
ID: Fn() -> T + Sync + Send,
T: Send,
fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>where
F: Fn(T, Self::Item) -> T + Sync + Send,
ID: Fn() -> T + Sync + Send,
T: Send,
Parallel fold is similar to sequential fold except that the
sequence of items may be subdivided before it is
folded. Consider a list of numbers like
22 3 77 89 46
. If
you used sequential fold to add them (fold(0, |a,b| a+b)
,
you would wind up first adding 0 + 22, then 22 + 3, then 25 +
77, and so forth. The parallel fold works similarly except
that it first breaks up your list into sublists, and hence
instead of yielding up a single sum at the end, it yields up
multiple sums. The number of results is nondeterministic, as
is the point where the breaks occur. Read moresourcefn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>where
F: Fn(T, Self::Item) -> T + Sync + Send,
T: Send + Clone,
fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>where
F: Fn(T, Self::Item) -> T + Sync + Send,
T: Send + Clone,
Applies
fold_op
to the given init
value with each item of this
iterator, finally producing the value for further use. Read moresourcefn try_fold<T, R, ID, F>(
self,
identity: ID,
fold_op: F
) -> TryFold<Self, R, ID, F>where
F: Fn(T, Self::Item) -> R + Sync + Send,
ID: Fn() -> T + Sync + Send,
R: Try<Output = T> + Send,
fn try_fold<T, R, ID, F>(
self,
identity: ID,
fold_op: F
) -> TryFold<Self, R, ID, F>where
F: Fn(T, Self::Item) -> R + Sync + Send,
ID: Fn() -> T + Sync + Send,
R: Try<Output = T> + Send,
Performs a fallible parallel fold. Read more
sourcefn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>where
F: Fn(T, Self::Item) -> R + Sync + Send,
R: Try<Output = T> + Send,
T: Clone + Send,
fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>where
F: Fn(T, Self::Item) -> R + Sync + Send,
R: Try<Output = T> + Send,
T: Clone + Send,
Performs a fallible parallel fold with a cloneable
init
value. Read moresourcefn sum<S>(self) -> Swhere
S: Send + Sum<Self::Item> + Sum<S>,
fn sum<S>(self) -> Swhere
S: Send + Sum<Self::Item> + Sum<S>,
Sums up the items in the iterator. Read more
sourcefn product<P>(self) -> Pwhere
P: Send + Product<Self::Item> + Product<P>,
fn product<P>(self) -> Pwhere
P: Send + Product<Self::Item> + Product<P>,
Multiplies all the items in the iterator. Read more
sourcefn min_by<F>(self, f: F) -> Option<Self::Item>where
F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,
fn min_by<F>(self, f: F) -> Option<Self::Item>where
F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,
Computes the minimum of all the items in the iterator with respect to
the given comparison function. If the iterator is empty,
None
is
returned; otherwise, Some(min)
is returned. Read moresourcefn min_by_key<K, F>(self, f: F) -> Option<Self::Item>where
K: Ord + Send,
F: Sync + Send + Fn(&Self::Item) -> K,
fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>where
K: Ord + Send,
F: Sync + Send + Fn(&Self::Item) -> K,
Computes the item that yields the minimum value for the given
function. If the iterator is empty,
None
is returned;
otherwise, Some(item)
is returned. Read moresourcefn max_by<F>(self, f: F) -> Option<Self::Item>where
F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,
fn max_by<F>(self, f: F) -> Option<Self::Item>where
F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,
Computes the maximum of all the items in the iterator with respect to
the given comparison function. If the iterator is empty,
None
is
returned; otherwise, Some(max)
is returned. Read moresourcefn max_by_key<K, F>(self, f: F) -> Option<Self::Item>where
K: Ord + Send,
F: Sync + Send + Fn(&Self::Item) -> K,
fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>where
K: Ord + Send,
F: Sync + Send + Fn(&Self::Item) -> K,
Computes the item that yields the maximum value for the given
function. If the iterator is empty,
None
is returned;
otherwise, Some(item)
is returned. Read moresourcefn chain<C>(self, chain: C) -> Chain<Self, C::Iter>where
C: IntoParallelIterator<Item = Self::Item>,
fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>where
C: IntoParallelIterator<Item = Self::Item>,
Takes two iterators and creates a new iterator over both. Read more
sourcefn find_any<P>(self, predicate: P) -> Option<Self::Item>where
P: Fn(&Self::Item) -> bool + Sync + Send,
fn find_any<P>(self, predicate: P) -> Option<Self::Item>where
P: Fn(&Self::Item) -> bool + Sync + Send,
Searches for some item in the parallel iterator that
matches the given predicate and returns it. This operation
is similar to
find
on sequential iterators but
the item returned may not be the first one in the parallel
sequence which matches, since we search the entire sequence in parallel. Read moresourcefn find_first<P>(self, predicate: P) -> Option<Self::Item>where
P: Fn(&Self::Item) -> bool + Sync + Send,
fn find_first<P>(self, predicate: P) -> Option<Self::Item>where
P: Fn(&Self::Item) -> bool + Sync + Send,
Searches for the sequentially first item in the parallel iterator
that matches the given predicate and returns it. Read more
sourcefn find_last<P>(self, predicate: P) -> Option<Self::Item>where
P: Fn(&Self::Item) -> bool + Sync + Send,
fn find_last<P>(self, predicate: P) -> Option<Self::Item>where
P: Fn(&Self::Item) -> bool + Sync + Send,
Searches for the sequentially last item in the parallel iterator
that matches the given predicate and returns it. Read more
sourcefn find_map_any<P, R>(self, predicate: P) -> Option<R>where
P: Fn(Self::Item) -> Option<R> + Sync + Send,
R: Send,
fn find_map_any<P, R>(self, predicate: P) -> Option<R>where
P: Fn(Self::Item) -> Option<R> + Sync + Send,
R: Send,
Applies the given predicate to the items in the parallel iterator
and returns any non-None result of the map operation. Read more
sourcefn find_map_first<P, R>(self, predicate: P) -> Option<R>where
P: Fn(Self::Item) -> Option<R> + Sync + Send,
R: Send,
fn find_map_first<P, R>(self, predicate: P) -> Option<R>where
P: Fn(Self::Item) -> Option<R> + Sync + Send,
R: Send,
Applies the given predicate to the items in the parallel iterator and
returns the sequentially first non-None result of the map operation. Read more
sourcefn find_map_last<P, R>(self, predicate: P) -> Option<R>where
P: Fn(Self::Item) -> Option<R> + Sync + Send,
R: Send,
fn find_map_last<P, R>(self, predicate: P) -> Option<R>where
P: Fn(Self::Item) -> Option<R> + Sync + Send,
R: Send,
Applies the given predicate to the items in the parallel iterator and
returns the sequentially last non-None result of the map operation. Read more
sourcefn any<P>(self, predicate: P) -> boolwhere
P: Fn(Self::Item) -> bool + Sync + Send,
fn any<P>(self, predicate: P) -> boolwhere
P: Fn(Self::Item) -> bool + Sync + Send,
Searches for some item in the parallel iterator that
matches the given predicate, and if so returns true. Once
a match is found, we’ll attempt to stop process the rest
of the items. Proving that there’s no match, returning false,
does require visiting every item. Read more
sourcefn all<P>(self, predicate: P) -> boolwhere
P: Fn(Self::Item) -> bool + Sync + Send,
fn all<P>(self, predicate: P) -> boolwhere
P: Fn(Self::Item) -> bool + Sync + Send,
Tests that every item in the parallel iterator matches the given
predicate, and if so returns true. If a counter-example is found,
we’ll attempt to stop processing more items, then return false. Read more
sourcefn while_some<T>(self) -> WhileSome<Self>where
Self: ParallelIterator<Item = Option<T>>,
T: Send,
fn while_some<T>(self) -> WhileSome<Self>where
Self: ParallelIterator<Item = Option<T>>,
T: Send,
Creates an iterator over the
Some
items of this iterator, halting
as soon as any None
is found. Read moresourcefn panic_fuse(self) -> PanicFuse<Self>
fn panic_fuse(self) -> PanicFuse<Self>
Wraps an iterator with a fuse in case of panics, to halt all threads
as soon as possible. Read more
sourcefn collect<C>(self) -> Cwhere
C: FromParallelIterator<Self::Item>,
fn collect<C>(self) -> Cwhere
C: FromParallelIterator<Self::Item>,
Creates a fresh collection containing all the elements produced
by this parallel iterator. Read more
sourcefn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)where
Self: ParallelIterator<Item = (A, B)>,
FromA: Default + Send + ParallelExtend<A>,
FromB: Default + Send + ParallelExtend<B>,
A: Send,
B: Send,
fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)where
Self: ParallelIterator<Item = (A, B)>,
FromA: Default + Send + ParallelExtend<A>,
FromB: Default + Send + ParallelExtend<B>,
A: Send,
B: Send,
Unzips the items of a parallel iterator into a pair of arbitrary
ParallelExtend
containers. Read moresourcefn partition<A, B, P>(self, predicate: P) -> (A, B)where
A: Default + Send + ParallelExtend<Self::Item>,
B: Default + Send + ParallelExtend<Self::Item>,
P: Fn(&Self::Item) -> bool + Sync + Send,
fn partition<A, B, P>(self, predicate: P) -> (A, B)where
A: Default + Send + ParallelExtend<Self::Item>,
B: Default + Send + ParallelExtend<Self::Item>,
P: Fn(&Self::Item) -> bool + Sync + Send,
Partitions the items of a parallel iterator into a pair of arbitrary
ParallelExtend
containers. Items for which the predicate
returns
true go into the first container, and the rest go into the second. Read moresourcefn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)where
A: Default + Send + ParallelExtend<L>,
B: Default + Send + ParallelExtend<R>,
P: Fn(Self::Item) -> Either<L, R> + Sync + Send,
L: Send,
R: Send,
fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)where
A: Default + Send + ParallelExtend<L>,
B: Default + Send + ParallelExtend<R>,
P: Fn(Self::Item) -> Either<L, R> + Sync + Send,
L: Send,
R: Send,
Partitions and maps the items of a parallel iterator into a pair of
arbitrary
ParallelExtend
containers. Either::Left
items go into
the first container, and Either::Right
items go into the second. Read moresourcefn take_any(self, n: usize) -> TakeAny<Self>
fn take_any(self, n: usize) -> TakeAny<Self>
Creates an iterator that yields
n
elements from anywhere in the original iterator. Read moresourcefn skip_any(self, n: usize) -> SkipAny<Self>
fn skip_any(self, n: usize) -> SkipAny<Self>
Creates an iterator that skips
n
elements from anywhere in the original iterator. Read moresourcefn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>where
P: Fn(&Self::Item) -> bool + Sync + Send,
fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>where
P: Fn(&Self::Item) -> bool + Sync + Send,
Creates an iterator that takes elements from anywhere in the original iterator
until the given
predicate
returns false
. Read moresourcefn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>where
P: Fn(&Self::Item) -> bool + Sync + Send,
fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>where
P: Fn(&Self::Item) -> bool + Sync + Send,
Creates an iterator that skips elements from anywhere in the original iterator
until the given
predicate
returns false
. Read moresourcefn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>
fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>
Collects this iterator into a linked list of vectors. Read more
sourceimpl<A, B, C, D, E> ParallelIterator for MultiZip<(A, B, C, D, E)>where
A: IndexedParallelIterator,
B: IndexedParallelIterator,
C: IndexedParallelIterator,
D: IndexedParallelIterator,
E: IndexedParallelIterator,
impl<A, B, C, D, E> ParallelIterator for MultiZip<(A, B, C, D, E)>where
A: IndexedParallelIterator,
B: IndexedParallelIterator,
C: IndexedParallelIterator,
D: IndexedParallelIterator,
E: IndexedParallelIterator,
type Item = (<A as ParallelIterator>::Item, <B as ParallelIterator>::Item, <C as ParallelIterator>::Item, <D as ParallelIterator>::Item, <E as ParallelIterator>::Item)
type Item = (<A as ParallelIterator>::Item, <B as ParallelIterator>::Item, <C as ParallelIterator>::Item, <D as ParallelIterator>::Item, <E as ParallelIterator>::Item)
sourcefn drive_unindexed<CONSUMER>(self, consumer: CONSUMER) -> CONSUMER::Resultwhere
CONSUMER: UnindexedConsumer<Self::Item>,
fn drive_unindexed<CONSUMER>(self, consumer: CONSUMER) -> CONSUMER::Resultwhere
CONSUMER: UnindexedConsumer<Self::Item>,
Internal method used to define the behavior of this parallel
iterator. You should not need to call this directly. Read more
sourcefn opt_len(&self) -> Option<usize>
fn opt_len(&self) -> Option<usize>
Internal method used to define the behavior of this parallel
iterator. You should not need to call this directly. Read more
sourcefn for_each<OP>(self, op: OP)where
OP: Fn(Self::Item) + Sync + Send,
fn for_each<OP>(self, op: OP)where
OP: Fn(Self::Item) + Sync + Send,
Executes
OP
on each item produced by the iterator, in parallel. Read moresourcefn for_each_with<OP, T>(self, init: T, op: OP)where
OP: Fn(&mut T, Self::Item) + Sync + Send,
T: Send + Clone,
fn for_each_with<OP, T>(self, init: T, op: OP)where
OP: Fn(&mut T, Self::Item) + Sync + Send,
T: Send + Clone,
sourcefn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)where
OP: Fn(&mut T, Self::Item) + Sync + Send,
INIT: Fn() -> T + Sync + Send,
fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)where
OP: Fn(&mut T, Self::Item) + Sync + Send,
INIT: Fn() -> T + Sync + Send,
Executes
OP
on a value returned by init
with each item produced by
the iterator, in parallel. Read moresourcefn try_for_each<OP, R>(self, op: OP) -> Rwhere
OP: Fn(Self::Item) -> R + Sync + Send,
R: Try<Output = ()> + Send,
fn try_for_each<OP, R>(self, op: OP) -> Rwhere
OP: Fn(Self::Item) -> R + Sync + Send,
R: Try<Output = ()> + Send,
Executes a fallible
OP
on each item produced by the iterator, in parallel. Read moresourcefn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> Rwhere
OP: Fn(&mut T, Self::Item) -> R + Sync + Send,
T: Send + Clone,
R: Try<Output = ()> + Send,
fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> Rwhere
OP: Fn(&mut T, Self::Item) -> R + Sync + Send,
T: Send + Clone,
R: Try<Output = ()> + Send,
Executes a fallible
OP
on the given init
value with each item
produced by the iterator, in parallel. Read moresourcefn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> Rwhere
OP: Fn(&mut T, Self::Item) -> R + Sync + Send,
INIT: Fn() -> T + Sync + Send,
R: Try<Output = ()> + Send,
fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> Rwhere
OP: Fn(&mut T, Self::Item) -> R + Sync + Send,
INIT: Fn() -> T + Sync + Send,
R: Try<Output = ()> + Send,
Executes a fallible
OP
on a value returned by init
with each item
produced by the iterator, in parallel. Read moresourcefn map<F, R>(self, map_op: F) -> Map<Self, F>where
F: Fn(Self::Item) -> R + Sync + Send,
R: Send,
fn map<F, R>(self, map_op: F) -> Map<Self, F>where
F: Fn(Self::Item) -> R + Sync + Send,
R: Send,
Applies
map_op
to each item of this iterator, producing a new
iterator with the results. Read moresourcefn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>where
F: Fn(&mut T, Self::Item) -> R + Sync + Send,
T: Send + Clone,
R: Send,
fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>where
F: Fn(&mut T, Self::Item) -> R + Sync + Send,
T: Send + Clone,
R: Send,
Applies
map_op
to the given init
value with each item of this
iterator, producing a new iterator with the results. Read moresourcefn map_init<F, INIT, T, R>(self, init: INIT, map_op: F) -> MapInit<Self, INIT, F>where
F: Fn(&mut T, Self::Item) -> R + Sync + Send,
INIT: Fn() -> T + Sync + Send,
R: Send,
fn map_init<F, INIT, T, R>(self, init: INIT, map_op: F) -> MapInit<Self, INIT, F>where
F: Fn(&mut T, Self::Item) -> R + Sync + Send,
INIT: Fn() -> T + Sync + Send,
R: Send,
Applies
map_op
to a value returned by init
with each item of this
iterator, producing a new iterator with the results. Read moresourcefn cloned<'a, T>(self) -> Cloned<Self>where
T: 'a + Clone + Send,
Self: ParallelIterator<Item = &'a T>,
fn cloned<'a, T>(self) -> Cloned<Self>where
T: 'a + Clone + Send,
Self: ParallelIterator<Item = &'a T>,
sourcefn copied<'a, T>(self) -> Copied<Self>where
T: 'a + Copy + Send,
Self: ParallelIterator<Item = &'a T>,
fn copied<'a, T>(self) -> Copied<Self>where
T: 'a + Copy + Send,
Self: ParallelIterator<Item = &'a T>,
sourcefn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>where
OP: Fn(&Self::Item) + Sync + Send,
fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>where
OP: Fn(&Self::Item) + Sync + Send,
Applies
inspect_op
to a reference to each item of this iterator,
producing a new iterator passing through the original items. This is
often useful for debugging to see what’s happening in iterator stages. Read moresourcefn update<F>(self, update_op: F) -> Update<Self, F>where
F: Fn(&mut Self::Item) + Sync + Send,
fn update<F>(self, update_op: F) -> Update<Self, F>where
F: Fn(&mut Self::Item) + Sync + Send,
Mutates each item of this iterator before yielding it. Read more
sourcefn filter<P>(self, filter_op: P) -> Filter<Self, P>where
P: Fn(&Self::Item) -> bool + Sync + Send,
fn filter<P>(self, filter_op: P) -> Filter<Self, P>where
P: Fn(&Self::Item) -> bool + Sync + Send,
Applies
filter_op
to each item of this iterator, producing a new
iterator with only the items that gave true
results. Read moresourcefn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>where
P: Fn(Self::Item) -> Option<R> + Sync + Send,
R: Send,
fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>where
P: Fn(Self::Item) -> Option<R> + Sync + Send,
R: Send,
Applies
filter_op
to each item of this iterator to get an Option
,
producing a new iterator with only the items from Some
results. Read moresourcefn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>where
F: Fn(Self::Item) -> PI + Sync + Send,
PI: IntoParallelIterator,
fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>where
F: Fn(Self::Item) -> PI + Sync + Send,
PI: IntoParallelIterator,
Applies
map_op
to each item of this iterator to get nested parallel iterators,
producing a new parallel iterator that flattens these back into one. Read moresourcefn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>where
F: Fn(Self::Item) -> SI + Sync + Send,
SI: IntoIterator,
SI::Item: Send,
fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>where
F: Fn(Self::Item) -> SI + Sync + Send,
SI: IntoIterator,
SI::Item: Send,
Applies
map_op
to each item of this iterator to get nested serial iterators,
producing a new parallel iterator that flattens these back into one. Read moresourcefn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Itemwhere
OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,
ID: Fn() -> Self::Item + Sync + Send,
fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Itemwhere
OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,
ID: Fn() -> Self::Item + Sync + Send,
Reduces the items in the iterator into one item using
op
.
The argument identity
should be a closure that can produce
“identity” value which may be inserted into the sequence as
needed to create opportunities for parallel execution. So, for
example, if you are doing a summation, then identity()
ought
to produce something that represents the zero for your type
(but consider just calling sum()
in that case). Read moresourcefn reduce_with<OP>(self, op: OP) -> Option<Self::Item>where
OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,
fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>where
OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,
Reduces the items in the iterator into one item using
op
.
If the iterator is empty, None
is returned; otherwise,
Some
is returned. Read moresourcefn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>where
F: Fn(T, Self::Item) -> T + Sync + Send,
ID: Fn() -> T + Sync + Send,
T: Send,
fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>where
F: Fn(T, Self::Item) -> T + Sync + Send,
ID: Fn() -> T + Sync + Send,
T: Send,
Parallel fold is similar to sequential fold except that the
sequence of items may be subdivided before it is
folded. Consider a list of numbers like
22 3 77 89 46
. If
you used sequential fold to add them (fold(0, |a,b| a+b)
,
you would wind up first adding 0 + 22, then 22 + 3, then 25 +
77, and so forth. The parallel fold works similarly except
that it first breaks up your list into sublists, and hence
instead of yielding up a single sum at the end, it yields up
multiple sums. The number of results is nondeterministic, as
is the point where the breaks occur. Read moresourcefn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>where
F: Fn(T, Self::Item) -> T + Sync + Send,
T: Send + Clone,
fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>where
F: Fn(T, Self::Item) -> T + Sync + Send,
T: Send + Clone,
Applies
fold_op
to the given init
value with each item of this
iterator, finally producing the value for further use. Read moresourcefn try_fold<T, R, ID, F>(
self,
identity: ID,
fold_op: F
) -> TryFold<Self, R, ID, F>where
F: Fn(T, Self::Item) -> R + Sync + Send,
ID: Fn() -> T + Sync + Send,
R: Try<Output = T> + Send,
fn try_fold<T, R, ID, F>(
self,
identity: ID,
fold_op: F
) -> TryFold<Self, R, ID, F>where
F: Fn(T, Self::Item) -> R + Sync + Send,
ID: Fn() -> T + Sync + Send,
R: Try<Output = T> + Send,
Performs a fallible parallel fold. Read more
sourcefn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>where
F: Fn(T, Self::Item) -> R + Sync + Send,
R: Try<Output = T> + Send,
T: Clone + Send,
fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>where
F: Fn(T, Self::Item) -> R + Sync + Send,
R: Try<Output = T> + Send,
T: Clone + Send,
Performs a fallible parallel fold with a cloneable
init
value. Read moresourcefn sum<S>(self) -> Swhere
S: Send + Sum<Self::Item> + Sum<S>,
fn sum<S>(self) -> Swhere
S: Send + Sum<Self::Item> + Sum<S>,
Sums up the items in the iterator. Read more
sourcefn product<P>(self) -> Pwhere
P: Send + Product<Self::Item> + Product<P>,
fn product<P>(self) -> Pwhere
P: Send + Product<Self::Item> + Product<P>,
Multiplies all the items in the iterator. Read more
sourcefn min_by<F>(self, f: F) -> Option<Self::Item>where
F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,
fn min_by<F>(self, f: F) -> Option<Self::Item>where
F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,
Computes the minimum of all the items in the iterator with respect to
the given comparison function. If the iterator is empty,
None
is
returned; otherwise, Some(min)
is returned. Read moresourcefn min_by_key<K, F>(self, f: F) -> Option<Self::Item>where
K: Ord + Send,
F: Sync + Send + Fn(&Self::Item) -> K,
fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>where
K: Ord + Send,
F: Sync + Send + Fn(&Self::Item) -> K,
Computes the item that yields the minimum value for the given
function. If the iterator is empty,
None
is returned;
otherwise, Some(item)
is returned. Read moresourcefn max_by<F>(self, f: F) -> Option<Self::Item>where
F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,
fn max_by<F>(self, f: F) -> Option<Self::Item>where
F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,
Computes the maximum of all the items in the iterator with respect to
the given comparison function. If the iterator is empty,
None
is
returned; otherwise, Some(max)
is returned. Read moresourcefn max_by_key<K, F>(self, f: F) -> Option<Self::Item>where
K: Ord + Send,
F: Sync + Send + Fn(&Self::Item) -> K,
fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>where
K: Ord + Send,
F: Sync + Send + Fn(&Self::Item) -> K,
Computes the item that yields the maximum value for the given
function. If the iterator is empty,
None
is returned;
otherwise, Some(item)
is returned. Read moresourcefn chain<C>(self, chain: C) -> Chain<Self, C::Iter>where
C: IntoParallelIterator<Item = Self::Item>,
fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>where
C: IntoParallelIterator<Item = Self::Item>,
Takes two iterators and creates a new iterator over both. Read more
sourcefn find_any<P>(self, predicate: P) -> Option<Self::Item>where
P: Fn(&Self::Item) -> bool + Sync + Send,
fn find_any<P>(self, predicate: P) -> Option<Self::Item>where
P: Fn(&Self::Item) -> bool + Sync + Send,
Searches for some item in the parallel iterator that
matches the given predicate and returns it. This operation
is similar to
find
on sequential iterators but
the item returned may not be the first one in the parallel
sequence which matches, since we search the entire sequence in parallel. Read moresourcefn find_first<P>(self, predicate: P) -> Option<Self::Item>where
P: Fn(&Self::Item) -> bool + Sync + Send,
fn find_first<P>(self, predicate: P) -> Option<Self::Item>where
P: Fn(&Self::Item) -> bool + Sync + Send,
Searches for the sequentially first item in the parallel iterator
that matches the given predicate and returns it. Read more
sourcefn find_last<P>(self, predicate: P) -> Option<Self::Item>where
P: Fn(&Self::Item) -> bool + Sync + Send,
fn find_last<P>(self, predicate: P) -> Option<Self::Item>where
P: Fn(&Self::Item) -> bool + Sync + Send,
Searches for the sequentially last item in the parallel iterator
that matches the given predicate and returns it. Read more
sourcefn find_map_any<P, R>(self, predicate: P) -> Option<R>where
P: Fn(Self::Item) -> Option<R> + Sync + Send,
R: Send,
fn find_map_any<P, R>(self, predicate: P) -> Option<R>where
P: Fn(Self::Item) -> Option<R> + Sync + Send,
R: Send,
Applies the given predicate to the items in the parallel iterator
and returns any non-None result of the map operation. Read more
sourcefn find_map_first<P, R>(self, predicate: P) -> Option<R>where
P: Fn(Self::Item) -> Option<R> + Sync + Send,
R: Send,
fn find_map_first<P, R>(self, predicate: P) -> Option<R>where
P: Fn(Self::Item) -> Option<R> + Sync + Send,
R: Send,
Applies the given predicate to the items in the parallel iterator and
returns the sequentially first non-None result of the map operation. Read more
sourcefn find_map_last<P, R>(self, predicate: P) -> Option<R>where
P: Fn(Self::Item) -> Option<R> + Sync + Send,
R: Send,
fn find_map_last<P, R>(self, predicate: P) -> Option<R>where
P: Fn(Self::Item) -> Option<R> + Sync + Send,
R: Send,
Applies the given predicate to the items in the parallel iterator and
returns the sequentially last non-None result of the map operation. Read more
sourcefn any<P>(self, predicate: P) -> boolwhere
P: Fn(Self::Item) -> bool + Sync + Send,
fn any<P>(self, predicate: P) -> boolwhere
P: Fn(Self::Item) -> bool + Sync + Send,
Searches for some item in the parallel iterator that
matches the given predicate, and if so returns true. Once
a match is found, we’ll attempt to stop process the rest
of the items. Proving that there’s no match, returning false,
does require visiting every item. Read more
sourcefn all<P>(self, predicate: P) -> boolwhere
P: Fn(Self::Item) -> bool + Sync + Send,
fn all<P>(self, predicate: P) -> boolwhere
P: Fn(Self::Item) -> bool + Sync + Send,
Tests that every item in the parallel iterator matches the given
predicate, and if so returns true. If a counter-example is found,
we’ll attempt to stop processing more items, then return false. Read more
sourcefn while_some<T>(self) -> WhileSome<Self>where
Self: ParallelIterator<Item = Option<T>>,
T: Send,
fn while_some<T>(self) -> WhileSome<Self>where
Self: ParallelIterator<Item = Option<T>>,
T: Send,
Creates an iterator over the
Some
items of this iterator, halting
as soon as any None
is found. Read moresourcefn panic_fuse(self) -> PanicFuse<Self>
fn panic_fuse(self) -> PanicFuse<Self>
Wraps an iterator with a fuse in case of panics, to halt all threads
as soon as possible. Read more
sourcefn collect<C>(self) -> Cwhere
C: FromParallelIterator<Self::Item>,
fn collect<C>(self) -> Cwhere
C: FromParallelIterator<Self::Item>,
Creates a fresh collection containing all the elements produced
by this parallel iterator. Read more
sourcefn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)where
Self: ParallelIterator<Item = (A, B)>,
FromA: Default + Send + ParallelExtend<A>,
FromB: Default + Send + ParallelExtend<B>,
A: Send,
B: Send,
fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)where
Self: ParallelIterator<Item = (A, B)>,
FromA: Default + Send + ParallelExtend<A>,
FromB: Default + Send + ParallelExtend<B>,
A: Send,
B: Send,
Unzips the items of a parallel iterator into a pair of arbitrary
ParallelExtend
containers. Read moresourcefn partition<A, B, P>(self, predicate: P) -> (A, B)where
A: Default + Send + ParallelExtend<Self::Item>,
B: Default + Send + ParallelExtend<Self::Item>,
P: Fn(&Self::Item) -> bool + Sync + Send,
fn partition<A, B, P>(self, predicate: P) -> (A, B)where
A: Default + Send + ParallelExtend<Self::Item>,
B: Default + Send + ParallelExtend<Self::Item>,
P: Fn(&Self::Item) -> bool + Sync + Send,
Partitions the items of a parallel iterator into a pair of arbitrary
ParallelExtend
containers. Items for which the predicate
returns
true go into the first container, and the rest go into the second. Read moresourcefn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)where
A: Default + Send + ParallelExtend<L>,
B: Default + Send + ParallelExtend<R>,
P: Fn(Self::Item) -> Either<L, R> + Sync + Send,
L: Send,
R: Send,
fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)where
A: Default + Send + ParallelExtend<L>,
B: Default + Send + ParallelExtend<R>,
P: Fn(Self::Item) -> Either<L, R> + Sync + Send,
L: Send,
R: Send,
Partitions and maps the items of a parallel iterator into a pair of
arbitrary
ParallelExtend
containers. Either::Left
items go into
the first container, and Either::Right
items go into the second. Read moresourcefn take_any(self, n: usize) -> TakeAny<Self>
fn take_any(self, n: usize) -> TakeAny<Self>
Creates an iterator that yields
n
elements from anywhere in the original iterator. Read moresourcefn skip_any(self, n: usize) -> SkipAny<Self>
fn skip_any(self, n: usize) -> SkipAny<Self>
Creates an iterator that skips
n
elements from anywhere in the original iterator. Read moresourcefn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>where
P: Fn(&Self::Item) -> bool + Sync + Send,
fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>where
P: Fn(&Self::Item) -> bool + Sync + Send,
Creates an iterator that takes elements from anywhere in the original iterator
until the given
predicate
returns false
. Read moresourcefn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>where
P: Fn(&Self::Item) -> bool + Sync + Send,
fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>where
P: Fn(&Self::Item) -> bool + Sync + Send,
Creates an iterator that skips elements from anywhere in the original iterator
until the given
predicate
returns false
. Read moresourcefn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>
fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>
Collects this iterator into a linked list of vectors. Read more
sourceimpl<A, B, C, D> ParallelIterator for MultiZip<(A, B, C, D)>where
A: IndexedParallelIterator,
B: IndexedParallelIterator,
C: IndexedParallelIterator,
D: IndexedParallelIterator,
impl<A, B, C, D> ParallelIterator for MultiZip<(A, B, C, D)>where
A: IndexedParallelIterator,
B: IndexedParallelIterator,
C: IndexedParallelIterator,
D: IndexedParallelIterator,
type Item = (<A as ParallelIterator>::Item, <B as ParallelIterator>::Item, <C as ParallelIterator>::Item, <D as ParallelIterator>::Item)
type Item = (<A as ParallelIterator>::Item, <B as ParallelIterator>::Item, <C as ParallelIterator>::Item, <D as ParallelIterator>::Item)
sourcefn drive_unindexed<CONSUMER>(self, consumer: CONSUMER) -> CONSUMER::Resultwhere
CONSUMER: UnindexedConsumer<Self::Item>,
fn drive_unindexed<CONSUMER>(self, consumer: CONSUMER) -> CONSUMER::Resultwhere
CONSUMER: UnindexedConsumer<Self::Item>,
Internal method used to define the behavior of this parallel
iterator. You should not need to call this directly. Read more
sourcefn opt_len(&self) -> Option<usize>
fn opt_len(&self) -> Option<usize>
Internal method used to define the behavior of this parallel
iterator. You should not need to call this directly. Read more
sourcefn for_each<OP>(self, op: OP)where
OP: Fn(Self::Item) + Sync + Send,
fn for_each<OP>(self, op: OP)where
OP: Fn(Self::Item) + Sync + Send,
Executes
OP
on each item produced by the iterator, in parallel. Read moresourcefn for_each_with<OP, T>(self, init: T, op: OP)where
OP: Fn(&mut T, Self::Item) + Sync + Send,
T: Send + Clone,
fn for_each_with<OP, T>(self, init: T, op: OP)where
OP: Fn(&mut T, Self::Item) + Sync + Send,
T: Send + Clone,
sourcefn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)where
OP: Fn(&mut T, Self::Item) + Sync + Send,
INIT: Fn() -> T + Sync + Send,
fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)where
OP: Fn(&mut T, Self::Item) + Sync + Send,
INIT: Fn() -> T + Sync + Send,
Executes
OP
on a value returned by init
with each item produced by
the iterator, in parallel. Read moresourcefn try_for_each<OP, R>(self, op: OP) -> Rwhere
OP: Fn(Self::Item) -> R + Sync + Send,
R: Try<Output = ()> + Send,
fn try_for_each<OP, R>(self, op: OP) -> Rwhere
OP: Fn(Self::Item) -> R + Sync + Send,
R: Try<Output = ()> + Send,
Executes a fallible
OP
on each item produced by the iterator, in parallel. Read moresourcefn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> Rwhere
OP: Fn(&mut T, Self::Item) -> R + Sync + Send,
T: Send + Clone,
R: Try<Output = ()> + Send,
fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> Rwhere
OP: Fn(&mut T, Self::Item) -> R + Sync + Send,
T: Send + Clone,
R: Try<Output = ()> + Send,
Executes a fallible
OP
on the given init
value with each item
produced by the iterator, in parallel. Read moresourcefn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> Rwhere
OP: Fn(&mut T, Self::Item) -> R + Sync + Send,
INIT: Fn() -> T + Sync + Send,
R: Try<Output = ()> + Send,
fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> Rwhere
OP: Fn(&mut T, Self::Item) -> R + Sync + Send,
INIT: Fn() -> T + Sync + Send,
R: Try<Output = ()> + Send,
Executes a fallible
OP
on a value returned by init
with each item
produced by the iterator, in parallel. Read moresourcefn map<F, R>(self, map_op: F) -> Map<Self, F>where
F: Fn(Self::Item) -> R + Sync + Send,
R: Send,
fn map<F, R>(self, map_op: F) -> Map<Self, F>where
F: Fn(Self::Item) -> R + Sync + Send,
R: Send,
Applies
map_op
to each item of this iterator, producing a new
iterator with the results. Read moresourcefn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>where
F: Fn(&mut T, Self::Item) -> R + Sync + Send,
T: Send + Clone,
R: Send,
fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>where
F: Fn(&mut T, Self::Item) -> R + Sync + Send,
T: Send + Clone,
R: Send,
Applies
map_op
to the given init
value with each item of this
iterator, producing a new iterator with the results. Read moresourcefn map_init<F, INIT, T, R>(self, init: INIT, map_op: F) -> MapInit<Self, INIT, F>where
F: Fn(&mut T, Self::Item) -> R + Sync + Send,
INIT: Fn() -> T + Sync + Send,
R: Send,
fn map_init<F, INIT, T, R>(self, init: INIT, map_op: F) -> MapInit<Self, INIT, F>where
F: Fn(&mut T, Self::Item) -> R + Sync + Send,
INIT: Fn() -> T + Sync + Send,
R: Send,
Applies
map_op
to a value returned by init
with each item of this
iterator, producing a new iterator with the results. Read moresourcefn cloned<'a, T>(self) -> Cloned<Self>where
T: 'a + Clone + Send,
Self: ParallelIterator<Item = &'a T>,
fn cloned<'a, T>(self) -> Cloned<Self>where
T: 'a + Clone + Send,
Self: ParallelIterator<Item = &'a T>,
sourcefn copied<'a, T>(self) -> Copied<Self>where
T: 'a + Copy + Send,
Self: ParallelIterator<Item = &'a T>,
fn copied<'a, T>(self) -> Copied<Self>where
T: 'a + Copy + Send,
Self: ParallelIterator<Item = &'a T>,
sourcefn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>where
OP: Fn(&Self::Item) + Sync + Send,
fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>where
OP: Fn(&Self::Item) + Sync + Send,
Applies
inspect_op
to a reference to each item of this iterator,
producing a new iterator passing through the original items. This is
often useful for debugging to see what’s happening in iterator stages. Read moresourcefn update<F>(self, update_op: F) -> Update<Self, F>where
F: Fn(&mut Self::Item) + Sync + Send,
fn update<F>(self, update_op: F) -> Update<Self, F>where
F: Fn(&mut Self::Item) + Sync + Send,
Mutates each item of this iterator before yielding it. Read more
sourcefn filter<P>(self, filter_op: P) -> Filter<Self, P>where
P: Fn(&Self::Item) -> bool + Sync + Send,
fn filter<P>(self, filter_op: P) -> Filter<Self, P>where
P: Fn(&Self::Item) -> bool + Sync + Send,
Applies
filter_op
to each item of this iterator, producing a new
iterator with only the items that gave true
results. Read moresourcefn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>where
P: Fn(Self::Item) -> Option<R> + Sync + Send,
R: Send,
fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>where
P: Fn(Self::Item) -> Option<R> + Sync + Send,
R: Send,
Applies
filter_op
to each item of this iterator to get an Option
,
producing a new iterator with only the items from Some
results. Read moresourcefn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>where
F: Fn(Self::Item) -> PI + Sync + Send,
PI: IntoParallelIterator,
fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>where
F: Fn(Self::Item) -> PI + Sync + Send,
PI: IntoParallelIterator,
Applies
map_op
to each item of this iterator to get nested parallel iterators,
producing a new parallel iterator that flattens these back into one. Read moresourcefn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>where
F: Fn(Self::Item) -> SI + Sync + Send,
SI: IntoIterator,
SI::Item: Send,
fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>where
F: Fn(Self::Item) -> SI + Sync + Send,
SI: IntoIterator,
SI::Item: Send,
Applies
map_op
to each item of this iterator to get nested serial iterators,
producing a new parallel iterator that flattens these back into one. Read moresourcefn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Itemwhere
OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,
ID: Fn() -> Self::Item + Sync + Send,
fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Itemwhere
OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,
ID: Fn() -> Self::Item + Sync + Send,
Reduces the items in the iterator into one item using
op
.
The argument identity
should be a closure that can produce
“identity” value which may be inserted into the sequence as
needed to create opportunities for parallel execution. So, for
example, if you are doing a summation, then identity()
ought
to produce something that represents the zero for your type
(but consider just calling sum()
in that case). Read moresourcefn reduce_with<OP>(self, op: OP) -> Option<Self::Item>where
OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,
fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>where
OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,
Reduces the items in the iterator into one item using
op
.
If the iterator is empty, None
is returned; otherwise,
Some
is returned. Read moresourcefn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>where
F: Fn(T, Self::Item) -> T + Sync + Send,
ID: Fn() -> T + Sync + Send,
T: Send,
fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>where
F: Fn(T, Self::Item) -> T + Sync + Send,
ID: Fn() -> T + Sync + Send,
T: Send,
Parallel fold is similar to sequential fold except that the
sequence of items may be subdivided before it is
folded. Consider a list of numbers like
22 3 77 89 46
. If
you used sequential fold to add them (fold(0, |a,b| a+b)
,
you would wind up first adding 0 + 22, then 22 + 3, then 25 +
77, and so forth. The parallel fold works similarly except
that it first breaks up your list into sublists, and hence
instead of yielding up a single sum at the end, it yields up
multiple sums. The number of results is nondeterministic, as
is the point where the breaks occur. Read moresourcefn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>where
F: Fn(T, Self::Item) -> T + Sync + Send,
T: Send + Clone,
fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>where
F: Fn(T, Self::Item) -> T + Sync + Send,
T: Send + Clone,
Applies
fold_op
to the given init
value with each item of this
iterator, finally producing the value for further use. Read moresourcefn try_fold<T, R, ID, F>(
self,
identity: ID,
fold_op: F
) -> TryFold<Self, R, ID, F>where
F: Fn(T, Self::Item) -> R + Sync + Send,
ID: Fn() -> T + Sync + Send,
R: Try<Output = T> + Send,
fn try_fold<T, R, ID, F>(
self,
identity: ID,
fold_op: F
) -> TryFold<Self, R, ID, F>where
F: Fn(T, Self::Item) -> R + Sync + Send,
ID: Fn() -> T + Sync + Send,
R: Try<Output = T> + Send,
Performs a fallible parallel fold. Read more
sourcefn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>where
F: Fn(T, Self::Item) -> R + Sync + Send,
R: Try<Output = T> + Send,
T: Clone + Send,
fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>where
F: Fn(T, Self::Item) -> R + Sync + Send,
R: Try<Output = T> + Send,
T: Clone + Send,
Performs a fallible parallel fold with a cloneable
init
value. Read moresourcefn sum<S>(self) -> Swhere
S: Send + Sum<Self::Item> + Sum<S>,
fn sum<S>(self) -> Swhere
S: Send + Sum<Self::Item> + Sum<S>,
Sums up the items in the iterator. Read more
sourcefn product<P>(self) -> Pwhere
P: Send + Product<Self::Item> + Product<P>,
fn product<P>(self) -> Pwhere
P: Send + Product<Self::Item> + Product<P>,
Multiplies all the items in the iterator. Read more
sourcefn min_by<F>(self, f: F) -> Option<Self::Item>where
F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,
fn min_by<F>(self, f: F) -> Option<Self::Item>where
F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,
Computes the minimum of all the items in the iterator with respect to
the given comparison function. If the iterator is empty,
None
is
returned; otherwise, Some(min)
is returned. Read moresourcefn min_by_key<K, F>(self, f: F) -> Option<Self::Item>where
K: Ord + Send,
F: Sync + Send + Fn(&Self::Item) -> K,
fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>where
K: Ord + Send,
F: Sync + Send + Fn(&Self::Item) -> K,
Computes the item that yields the minimum value for the given
function. If the iterator is empty,
None
is returned;
otherwise, Some(item)
is returned. Read moresourcefn max_by<F>(self, f: F) -> Option<Self::Item>where
F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,
fn max_by<F>(self, f: F) -> Option<Self::Item>where
F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,
Computes the maximum of all the items in the iterator with respect to
the given comparison function. If the iterator is empty,
None
is
returned; otherwise, Some(max)
is returned. Read moresourcefn max_by_key<K, F>(self, f: F) -> Option<Self::Item>where
K: Ord + Send,
F: Sync + Send + Fn(&Self::Item) -> K,
fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>where
K: Ord + Send,
F: Sync + Send + Fn(&Self::Item) -> K,
Computes the item that yields the maximum value for the given
function. If the iterator is empty,
None
is returned;
otherwise, Some(item)
is returned. Read moresourcefn chain<C>(self, chain: C) -> Chain<Self, C::Iter>where
C: IntoParallelIterator<Item = Self::Item>,
fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>where
C: IntoParallelIterator<Item = Self::Item>,
Takes two iterators and creates a new iterator over both. Read more
sourcefn find_any<P>(self, predicate: P) -> Option<Self::Item>where
P: Fn(&Self::Item) -> bool + Sync + Send,
fn find_any<P>(self, predicate: P) -> Option<Self::Item>where
P: Fn(&Self::Item) -> bool + Sync + Send,
Searches for some item in the parallel iterator that
matches the given predicate and returns it. This operation
is similar to
find
on sequential iterators but
the item returned may not be the first one in the parallel
sequence which matches, since we search the entire sequence in parallel. Read moresourcefn find_first<P>(self, predicate: P) -> Option<Self::Item>where
P: Fn(&Self::Item) -> bool + Sync + Send,
fn find_first<P>(self, predicate: P) -> Option<Self::Item>where
P: Fn(&Self::Item) -> bool + Sync + Send,
Searches for the sequentially first item in the parallel iterator
that matches the given predicate and returns it. Read more
sourcefn find_last<P>(self, predicate: P) -> Option<Self::Item>where
P: Fn(&Self::Item) -> bool + Sync + Send,
fn find_last<P>(self, predicate: P) -> Option<Self::Item>where
P: Fn(&Self::Item) -> bool + Sync + Send,
Searches for the sequentially last item in the parallel iterator
that matches the given predicate and returns it. Read more
sourcefn find_map_any<P, R>(self, predicate: P) -> Option<R>where
P: Fn(Self::Item) -> Option<R> + Sync + Send,
R: Send,
fn find_map_any<P, R>(self, predicate: P) -> Option<R>where
P: Fn(Self::Item) -> Option<R> + Sync + Send,
R: Send,
Applies the given predicate to the items in the parallel iterator
and returns any non-None result of the map operation. Read more
sourcefn find_map_first<P, R>(self, predicate: P) -> Option<R>where
P: Fn(Self::Item) -> Option<R> + Sync + Send,
R: Send,
fn find_map_first<P, R>(self, predicate: P) -> Option<R>where
P: Fn(Self::Item) -> Option<R> + Sync + Send,
R: Send,
Applies the given predicate to the items in the parallel iterator and
returns the sequentially first non-None result of the map operation. Read more
sourcefn find_map_last<P, R>(self, predicate: P) -> Option<R>where
P: Fn(Self::Item) -> Option<R> + Sync + Send,
R: Send,
fn find_map_last<P, R>(self, predicate: P) -> Option<R>where
P: Fn(Self::Item) -> Option<R> + Sync + Send,
R: Send,
Applies the given predicate to the items in the parallel iterator and
returns the sequentially last non-None result of the map operation. Read more
sourcefn any<P>(self, predicate: P) -> boolwhere
P: Fn(Self::Item) -> bool + Sync + Send,
fn any<P>(self, predicate: P) -> boolwhere
P: Fn(Self::Item) -> bool + Sync + Send,
Searches for some item in the parallel iterator that
matches the given predicate, and if so returns true. Once
a match is found, we’ll attempt to stop process the rest
of the items. Proving that there’s no match, returning false,
does require visiting every item. Read more
sourcefn all<P>(self, predicate: P) -> boolwhere
P: Fn(Self::Item) -> bool + Sync + Send,
fn all<P>(self, predicate: P) -> boolwhere
P: Fn(Self::Item) -> bool + Sync + Send,
Tests that every item in the parallel iterator matches the given
predicate, and if so returns true. If a counter-example is found,
we’ll attempt to stop processing more items, then return false. Read more
sourcefn while_some<T>(self) -> WhileSome<Self>where
Self: ParallelIterator<Item = Option<T>>,
T: Send,
fn while_some<T>(self) -> WhileSome<Self>where
Self: ParallelIterator<Item = Option<T>>,
T: Send,
Creates an iterator over the
Some
items of this iterator, halting
as soon as any None
is found. Read moresourcefn panic_fuse(self) -> PanicFuse<Self>
fn panic_fuse(self) -> PanicFuse<Self>
Wraps an iterator with a fuse in case of panics, to halt all threads
as soon as possible. Read more
sourcefn collect<C>(self) -> Cwhere
C: FromParallelIterator<Self::Item>,
fn collect<C>(self) -> Cwhere
C: FromParallelIterator<Self::Item>,
Creates a fresh collection containing all the elements produced
by this parallel iterator. Read more
sourcefn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)where
Self: ParallelIterator<Item = (A, B)>,
FromA: Default + Send + ParallelExtend<A>,
FromB: Default + Send + ParallelExtend<B>,
A: Send,
B: Send,
fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)where
Self: ParallelIterator<Item = (A, B)>,
FromA: Default + Send + ParallelExtend<A>,
FromB: Default + Send + ParallelExtend<B>,
A: Send,
B: Send,
Unzips the items of a parallel iterator into a pair of arbitrary
ParallelExtend
containers. Read moresourcefn partition<A, B, P>(self, predicate: P) -> (A, B)where
A: Default + Send + ParallelExtend<Self::Item>,
B: Default + Send + ParallelExtend<Self::Item>,
P: Fn(&Self::Item) -> bool + Sync + Send,
fn partition<A, B, P>(self, predicate: P) -> (A, B)where
A: Default + Send + ParallelExtend<Self::Item>,
B: Default + Send + ParallelExtend<Self::Item>,
P: Fn(&Self::Item) -> bool + Sync + Send,
Partitions the items of a parallel iterator into a pair of arbitrary
ParallelExtend
containers. Items for which the predicate
returns
true go into the first container, and the rest go into the second. Read moresourcefn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)where
A: Default + Send + ParallelExtend<L>,
B: Default + Send + ParallelExtend<R>,
P: Fn(Self::Item) -> Either<L, R> + Sync + Send,
L: Send,
R: Send,
fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)where
A: Default + Send + ParallelExtend<L>,
B: Default + Send + ParallelExtend<R>,
P: Fn(Self::Item) -> Either<L, R> + Sync + Send,
L: Send,
R: Send,
Partitions and maps the items of a parallel iterator into a pair of
arbitrary
ParallelExtend
containers. Either::Left
items go into
the first container, and Either::Right
items go into the second. Read moresourcefn take_any(self, n: usize) -> TakeAny<Self>
fn take_any(self, n: usize) -> TakeAny<Self>
Creates an iterator that yields
n
elements from anywhere in the original iterator. Read moresourcefn skip_any(self, n: usize) -> SkipAny<Self>
fn skip_any(self, n: usize) -> SkipAny<Self>
Creates an iterator that skips
n
elements from anywhere in the original iterator. Read moresourcefn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>where
P: Fn(&Self::Item) -> bool + Sync + Send,
fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>where
P: Fn(&Self::Item) -> bool + Sync + Send,
Creates an iterator that takes elements from anywhere in the original iterator
until the given
predicate
returns false
. Read moresourcefn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>where
P: Fn(&Self::Item) -> bool + Sync + Send,
fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>where
P: Fn(&Self::Item) -> bool + Sync + Send,
Creates an iterator that skips elements from anywhere in the original iterator
until the given
predicate
returns false
. Read moresourcefn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>
fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>
Collects this iterator into a linked list of vectors. Read more
sourceimpl<A, B, C> ParallelIterator for MultiZip<(A, B, C)>where
A: IndexedParallelIterator,
B: IndexedParallelIterator,
C: IndexedParallelIterator,
impl<A, B, C> ParallelIterator for MultiZip<(A, B, C)>where
A: IndexedParallelIterator,
B: IndexedParallelIterator,
C: IndexedParallelIterator,
type Item = (<A as ParallelIterator>::Item, <B as ParallelIterator>::Item, <C as ParallelIterator>::Item)
type Item = (<A as ParallelIterator>::Item, <B as ParallelIterator>::Item, <C as ParallelIterator>::Item)
sourcefn drive_unindexed<CONSUMER>(self, consumer: CONSUMER) -> CONSUMER::Resultwhere
CONSUMER: UnindexedConsumer<Self::Item>,
fn drive_unindexed<CONSUMER>(self, consumer: CONSUMER) -> CONSUMER::Resultwhere
CONSUMER: UnindexedConsumer<Self::Item>,
Internal method used to define the behavior of this parallel
iterator. You should not need to call this directly. Read more
sourcefn opt_len(&self) -> Option<usize>
fn opt_len(&self) -> Option<usize>
Internal method used to define the behavior of this parallel
iterator. You should not need to call this directly. Read more
sourcefn for_each<OP>(self, op: OP)where
OP: Fn(Self::Item) + Sync + Send,
fn for_each<OP>(self, op: OP)where
OP: Fn(Self::Item) + Sync + Send,
Executes
OP
on each item produced by the iterator, in parallel. Read moresourcefn for_each_with<OP, T>(self, init: T, op: OP)where
OP: Fn(&mut T, Self::Item) + Sync + Send,
T: Send + Clone,
fn for_each_with<OP, T>(self, init: T, op: OP)where
OP: Fn(&mut T, Self::Item) + Sync + Send,
T: Send + Clone,
sourcefn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)where
OP: Fn(&mut T, Self::Item) + Sync + Send,
INIT: Fn() -> T + Sync + Send,
fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)where
OP: Fn(&mut T, Self::Item) + Sync + Send,
INIT: Fn() -> T + Sync + Send,
Executes
OP
on a value returned by init
with each item produced by
the iterator, in parallel. Read moresourcefn try_for_each<OP, R>(self, op: OP) -> Rwhere
OP: Fn(Self::Item) -> R + Sync + Send,
R: Try<Output = ()> + Send,
fn try_for_each<OP, R>(self, op: OP) -> Rwhere
OP: Fn(Self::Item) -> R + Sync + Send,
R: Try<Output = ()> + Send,
Executes a fallible
OP
on each item produced by the iterator, in parallel. Read moresourcefn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> Rwhere
OP: Fn(&mut T, Self::Item) -> R + Sync + Send,
T: Send + Clone,
R: Try<Output = ()> + Send,
fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> Rwhere
OP: Fn(&mut T, Self::Item) -> R + Sync + Send,
T: Send + Clone,
R: Try<Output = ()> + Send,
Executes a fallible
OP
on the given init
value with each item
produced by the iterator, in parallel. Read moresourcefn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> Rwhere
OP: Fn(&mut T, Self::Item) -> R + Sync + Send,
INIT: Fn() -> T + Sync + Send,
R: Try<Output = ()> + Send,
fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> Rwhere
OP: Fn(&mut T, Self::Item) -> R + Sync + Send,
INIT: Fn() -> T + Sync + Send,
R: Try<Output = ()> + Send,
Executes a fallible
OP
on a value returned by init
with each item
produced by the iterator, in parallel. Read moresourcefn map<F, R>(self, map_op: F) -> Map<Self, F>where
F: Fn(Self::Item) -> R + Sync + Send,
R: Send,
fn map<F, R>(self, map_op: F) -> Map<Self, F>where
F: Fn(Self::Item) -> R + Sync + Send,
R: Send,
Applies
map_op
to each item of this iterator, producing a new
iterator with the results. Read moresourcefn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>where
F: Fn(&mut T, Self::Item) -> R + Sync + Send,
T: Send + Clone,
R: Send,
fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>where
F: Fn(&mut T, Self::Item) -> R + Sync + Send,
T: Send + Clone,
R: Send,
Applies
map_op
to the given init
value with each item of this
iterator, producing a new iterator with the results. Read moresourcefn map_init<F, INIT, T, R>(self, init: INIT, map_op: F) -> MapInit<Self, INIT, F>where
F: Fn(&mut T, Self::Item) -> R + Sync + Send,
INIT: Fn() -> T + Sync + Send,
R: Send,
fn map_init<F, INIT, T, R>(self, init: INIT, map_op: F) -> MapInit<Self, INIT, F>where
F: Fn(&mut T, Self::Item) -> R + Sync + Send,
INIT: Fn() -> T + Sync + Send,
R: Send,
Applies
map_op
to a value returned by init
with each item of this
iterator, producing a new iterator with the results. Read moresourcefn cloned<'a, T>(self) -> Cloned<Self>where
T: 'a + Clone + Send,
Self: ParallelIterator<Item = &'a T>,
fn cloned<'a, T>(self) -> Cloned<Self>where
T: 'a + Clone + Send,
Self: ParallelIterator<Item = &'a T>,
sourcefn copied<'a, T>(self) -> Copied<Self>where
T: 'a + Copy + Send,
Self: ParallelIterator<Item = &'a T>,
fn copied<'a, T>(self) -> Copied<Self>where
T: 'a + Copy + Send,
Self: ParallelIterator<Item = &'a T>,
sourcefn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>where
OP: Fn(&Self::Item) + Sync + Send,
fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>where
OP: Fn(&Self::Item) + Sync + Send,
Applies
inspect_op
to a reference to each item of this iterator,
producing a new iterator passing through the original items. This is
often useful for debugging to see what’s happening in iterator stages. Read moresourcefn update<F>(self, update_op: F) -> Update<Self, F>where
F: Fn(&mut Self::Item) + Sync + Send,
fn update<F>(self, update_op: F) -> Update<Self, F>where
F: Fn(&mut Self::Item) + Sync + Send,
Mutates each item of this iterator before yielding it. Read more
sourcefn filter<P>(self, filter_op: P) -> Filter<Self, P>where
P: Fn(&Self::Item) -> bool + Sync + Send,
fn filter<P>(self, filter_op: P) -> Filter<Self, P>where
P: Fn(&Self::Item) -> bool + Sync + Send,
Applies
filter_op
to each item of this iterator, producing a new
iterator with only the items that gave true
results. Read moresourcefn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>where
P: Fn(Self::Item) -> Option<R> + Sync + Send,
R: Send,
fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>where
P: Fn(Self::Item) -> Option<R> + Sync + Send,
R: Send,
Applies
filter_op
to each item of this iterator to get an Option
,
producing a new iterator with only the items from Some
results. Read moresourcefn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>where
F: Fn(Self::Item) -> PI + Sync + Send,
PI: IntoParallelIterator,
fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>where
F: Fn(Self::Item) -> PI + Sync + Send,
PI: IntoParallelIterator,
Applies
map_op
to each item of this iterator to get nested parallel iterators,
producing a new parallel iterator that flattens these back into one. Read moresourcefn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>where
F: Fn(Self::Item) -> SI + Sync + Send,
SI: IntoIterator,
SI::Item: Send,
fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>where
F: Fn(Self::Item) -> SI + Sync + Send,
SI: IntoIterator,
SI::Item: Send,
Applies
map_op
to each item of this iterator to get nested serial iterators,
producing a new parallel iterator that flattens these back into one. Read moresourcefn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Itemwhere
OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,
ID: Fn() -> Self::Item + Sync + Send,
fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Itemwhere
OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,
ID: Fn() -> Self::Item + Sync + Send,
Reduces the items in the iterator into one item using
op
.
The argument identity
should be a closure that can produce
“identity” value which may be inserted into the sequence as
needed to create opportunities for parallel execution. So, for
example, if you are doing a summation, then identity()
ought
to produce something that represents the zero for your type
(but consider just calling sum()
in that case). Read moresourcefn reduce_with<OP>(self, op: OP) -> Option<Self::Item>where
OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,
fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>where
OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,
Reduces the items in the iterator into one item using
op
.
If the iterator is empty, None
is returned; otherwise,
Some
is returned. Read moresourcefn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>where
F: Fn(T, Self::Item) -> T + Sync + Send,
ID: Fn() -> T + Sync + Send,
T: Send,
fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>where
F: Fn(T, Self::Item) -> T + Sync + Send,
ID: Fn() -> T + Sync + Send,
T: Send,
Parallel fold is similar to sequential fold except that the
sequence of items may be subdivided before it is
folded. Consider a list of numbers like
22 3 77 89 46
. If
you used sequential fold to add them (fold(0, |a,b| a+b)
,
you would wind up first adding 0 + 22, then 22 + 3, then 25 +
77, and so forth. The parallel fold works similarly except
that it first breaks up your list into sublists, and hence
instead of yielding up a single sum at the end, it yields up
multiple sums. The number of results is nondeterministic, as
is the point where the breaks occur. Read moresourcefn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>where
F: Fn(T, Self::Item) -> T + Sync + Send,
T: Send + Clone,
fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>where
F: Fn(T, Self::Item) -> T + Sync + Send,
T: Send + Clone,
Applies
fold_op
to the given init
value with each item of this
iterator, finally producing the value for further use. Read moresourcefn try_fold<T, R, ID, F>(
self,
identity: ID,
fold_op: F
) -> TryFold<Self, R, ID, F>where
F: Fn(T, Self::Item) -> R + Sync + Send,
ID: Fn() -> T + Sync + Send,
R: Try<Output = T> + Send,
fn try_fold<T, R, ID, F>(
self,
identity: ID,
fold_op: F
) -> TryFold<Self, R, ID, F>where
F: Fn(T, Self::Item) -> R + Sync + Send,
ID: Fn() -> T + Sync + Send,
R: Try<Output = T> + Send,
Performs a fallible parallel fold. Read more
sourcefn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>where
F: Fn(T, Self::Item) -> R + Sync + Send,
R: Try<Output = T> + Send,
T: Clone + Send,
fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>where
F: Fn(T, Self::Item) -> R + Sync + Send,
R: Try<Output = T> + Send,
T: Clone + Send,
Performs a fallible parallel fold with a cloneable
init
value. Read moresourcefn sum<S>(self) -> Swhere
S: Send + Sum<Self::Item> + Sum<S>,
fn sum<S>(self) -> Swhere
S: Send + Sum<Self::Item> + Sum<S>,
Sums up the items in the iterator. Read more
sourcefn product<P>(self) -> Pwhere
P: Send + Product<Self::Item> + Product<P>,
fn product<P>(self) -> Pwhere
P: Send + Product<Self::Item> + Product<P>,
Multiplies all the items in the iterator. Read more
sourcefn min_by<F>(self, f: F) -> Option<Self::Item>where
F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,
fn min_by<F>(self, f: F) -> Option<Self::Item>where
F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,
Computes the minimum of all the items in the iterator with respect to
the given comparison function. If the iterator is empty,
None
is
returned; otherwise, Some(min)
is returned. Read moresourcefn min_by_key<K, F>(self, f: F) -> Option<Self::Item>where
K: Ord + Send,
F: Sync + Send + Fn(&Self::Item) -> K,
fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>where
K: Ord + Send,
F: Sync + Send + Fn(&Self::Item) -> K,
Computes the item that yields the minimum value for the given
function. If the iterator is empty,
None
is returned;
otherwise, Some(item)
is returned. Read moresourcefn max_by<F>(self, f: F) -> Option<Self::Item>where
F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,
fn max_by<F>(self, f: F) -> Option<Self::Item>where
F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,
Computes the maximum of all the items in the iterator with respect to
the given comparison function. If the iterator is empty,
None
is
returned; otherwise, Some(max)
is returned. Read moresourcefn max_by_key<K, F>(self, f: F) -> Option<Self::Item>where
K: Ord + Send,
F: Sync + Send + Fn(&Self::Item) -> K,
fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>where
K: Ord + Send,
F: Sync + Send + Fn(&Self::Item) -> K,
Computes the item that yields the maximum value for the given
function. If the iterator is empty,
None
is returned;
otherwise, Some(item)
is returned. Read moresourcefn chain<C>(self, chain: C) -> Chain<Self, C::Iter>where
C: IntoParallelIterator<Item = Self::Item>,
fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>where
C: IntoParallelIterator<Item = Self::Item>,
Takes two iterators and creates a new iterator over both. Read more
sourcefn find_any<P>(self, predicate: P) -> Option<Self::Item>where
P: Fn(&Self::Item) -> bool + Sync + Send,
fn find_any<P>(self, predicate: P) -> Option<Self::Item>where
P: Fn(&Self::Item) -> bool + Sync + Send,
Searches for some item in the parallel iterator that
matches the given predicate and returns it. This operation
is similar to
find
on sequential iterators but
the item returned may not be the first one in the parallel
sequence which matches, since we search the entire sequence in parallel. Read moresourcefn find_first<P>(self, predicate: P) -> Option<Self::Item>where
P: Fn(&Self::Item) -> bool + Sync + Send,
fn find_first<P>(self, predicate: P) -> Option<Self::Item>where
P: Fn(&Self::Item) -> bool + Sync + Send,
Searches for the sequentially first item in the parallel iterator
that matches the given predicate and returns it. Read more
sourcefn find_last<P>(self, predicate: P) -> Option<Self::Item>where
P: Fn(&Self::Item) -> bool + Sync + Send,
fn find_last<P>(self, predicate: P) -> Option<Self::Item>where
P: Fn(&Self::Item) -> bool + Sync + Send,
Searches for the sequentially last item in the parallel iterator
that matches the given predicate and returns it. Read more
sourcefn find_map_any<P, R>(self, predicate: P) -> Option<R>where
P: Fn(Self::Item) -> Option<R> + Sync + Send,
R: Send,
fn find_map_any<P, R>(self, predicate: P) -> Option<R>where
P: Fn(Self::Item) -> Option<R> + Sync + Send,
R: Send,
Applies the given predicate to the items in the parallel iterator
and returns any non-None result of the map operation. Read more
sourcefn find_map_first<P, R>(self, predicate: P) -> Option<R>where
P: Fn(Self::Item) -> Option<R> + Sync + Send,
R: Send,
fn find_map_first<P, R>(self, predicate: P) -> Option<R>where
P: Fn(Self::Item) -> Option<R> + Sync + Send,
R: Send,
Applies the given predicate to the items in the parallel iterator and
returns the sequentially first non-None result of the map operation. Read more
sourcefn find_map_last<P, R>(self, predicate: P) -> Option<R>where
P: Fn(Self::Item) -> Option<R> + Sync + Send,
R: Send,
fn find_map_last<P, R>(self, predicate: P) -> Option<R>where
P: Fn(Self::Item) -> Option<R> + Sync + Send,
R: Send,
Applies the given predicate to the items in the parallel iterator and
returns the sequentially last non-None result of the map operation. Read more
sourcefn any<P>(self, predicate: P) -> boolwhere
P: Fn(Self::Item) -> bool + Sync + Send,
fn any<P>(self, predicate: P) -> boolwhere
P: Fn(Self::Item) -> bool + Sync + Send,
Searches for some item in the parallel iterator that
matches the given predicate, and if so returns true. Once
a match is found, we’ll attempt to stop process the rest
of the items. Proving that there’s no match, returning false,
does require visiting every item. Read more
sourcefn all<P>(self, predicate: P) -> boolwhere
P: Fn(Self::Item) -> bool + Sync + Send,
fn all<P>(self, predicate: P) -> boolwhere
P: Fn(Self::Item) -> bool + Sync + Send,
Tests that every item in the parallel iterator matches the given
predicate, and if so returns true. If a counter-example is found,
we’ll attempt to stop processing more items, then return false. Read more
sourcefn while_some<T>(self) -> WhileSome<Self>where
Self: ParallelIterator<Item = Option<T>>,
T: Send,
fn while_some<T>(self) -> WhileSome<Self>where
Self: ParallelIterator<Item = Option<T>>,
T: Send,
Creates an iterator over the
Some
items of this iterator, halting
as soon as any None
is found. Read moresourcefn panic_fuse(self) -> PanicFuse<Self>
fn panic_fuse(self) -> PanicFuse<Self>
Wraps an iterator with a fuse in case of panics, to halt all threads
as soon as possible. Read more
sourcefn collect<C>(self) -> Cwhere
C: FromParallelIterator<Self::Item>,
fn collect<C>(self) -> Cwhere
C: FromParallelIterator<Self::Item>,
Creates a fresh collection containing all the elements produced
by this parallel iterator. Read more
sourcefn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)where
Self: ParallelIterator<Item = (A, B)>,
FromA: Default + Send + ParallelExtend<A>,
FromB: Default + Send + ParallelExtend<B>,
A: Send,
B: Send,
fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)where
Self: ParallelIterator<Item = (A, B)>,
FromA: Default + Send + ParallelExtend<A>,
FromB: Default + Send + ParallelExtend<B>,
A: Send,
B: Send,
Unzips the items of a parallel iterator into a pair of arbitrary
ParallelExtend
containers. Read moresourcefn partition<A, B, P>(self, predicate: P) -> (A, B)where
A: Default + Send + ParallelExtend<Self::Item>,
B: Default + Send + ParallelExtend<Self::Item>,
P: Fn(&Self::Item) -> bool + Sync + Send,
fn partition<A, B, P>(self, predicate: P) -> (A, B)where
A: Default + Send + ParallelExtend<Self::Item>,
B: Default + Send + ParallelExtend<Self::Item>,
P: Fn(&Self::Item) -> bool + Sync + Send,
Partitions the items of a parallel iterator into a pair of arbitrary
ParallelExtend
containers. Items for which the predicate
returns
true go into the first container, and the rest go into the second. Read moresourcefn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)where
A: Default + Send + ParallelExtend<L>,
B: Default + Send + ParallelExtend<R>,
P: Fn(Self::Item) -> Either<L, R> + Sync + Send,
L: Send,
R: Send,
fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)where
A: Default + Send + ParallelExtend<L>,
B: Default + Send + ParallelExtend<R>,
P: Fn(Self::Item) -> Either<L, R> + Sync + Send,
L: Send,
R: Send,
Partitions and maps the items of a parallel iterator into a pair of
arbitrary
ParallelExtend
containers. Either::Left
items go into
the first container, and Either::Right
items go into the second. Read moresourcefn take_any(self, n: usize) -> TakeAny<Self>
fn take_any(self, n: usize) -> TakeAny<Self>
Creates an iterator that yields
n
elements from anywhere in the original iterator. Read moresourcefn skip_any(self, n: usize) -> SkipAny<Self>
fn skip_any(self, n: usize) -> SkipAny<Self>
Creates an iterator that skips
n
elements from anywhere in the original iterator. Read moresourcefn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>where
P: Fn(&Self::Item) -> bool + Sync + Send,
fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>where
P: Fn(&Self::Item) -> bool + Sync + Send,
Creates an iterator that takes elements from anywhere in the original iterator
until the given
predicate
returns false
. Read moresourcefn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>where
P: Fn(&Self::Item) -> bool + Sync + Send,
fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>where
P: Fn(&Self::Item) -> bool + Sync + Send,
Creates an iterator that skips elements from anywhere in the original iterator
until the given
predicate
returns false
. Read moresourcefn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>
fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>
Collects this iterator into a linked list of vectors. Read more
sourceimpl<A, B> ParallelIterator for MultiZip<(A, B)>where
A: IndexedParallelIterator,
B: IndexedParallelIterator,
impl<A, B> ParallelIterator for MultiZip<(A, B)>where
A: IndexedParallelIterator,
B: IndexedParallelIterator,
type Item = (<A as ParallelIterator>::Item, <B as ParallelIterator>::Item)
type Item = (<A as ParallelIterator>::Item, <B as ParallelIterator>::Item)
sourcefn drive_unindexed<CONSUMER>(self, consumer: CONSUMER) -> CONSUMER::Resultwhere
CONSUMER: UnindexedConsumer<Self::Item>,
fn drive_unindexed<CONSUMER>(self, consumer: CONSUMER) -> CONSUMER::Resultwhere
CONSUMER: UnindexedConsumer<Self::Item>,
Internal method used to define the behavior of this parallel
iterator. You should not need to call this directly. Read more
sourcefn opt_len(&self) -> Option<usize>
fn opt_len(&self) -> Option<usize>
Internal method used to define the behavior of this parallel
iterator. You should not need to call this directly. Read more
sourcefn for_each<OP>(self, op: OP)where
OP: Fn(Self::Item) + Sync + Send,
fn for_each<OP>(self, op: OP)where
OP: Fn(Self::Item) + Sync + Send,
Executes
OP
on each item produced by the iterator, in parallel. Read moresourcefn for_each_with<OP, T>(self, init: T, op: OP)where
OP: Fn(&mut T, Self::Item) + Sync + Send,
T: Send + Clone,
fn for_each_with<OP, T>(self, init: T, op: OP)where
OP: Fn(&mut T, Self::Item) + Sync + Send,
T: Send + Clone,
sourcefn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)where
OP: Fn(&mut T, Self::Item) + Sync + Send,
INIT: Fn() -> T + Sync + Send,
fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)where
OP: Fn(&mut T, Self::Item) + Sync + Send,
INIT: Fn() -> T + Sync + Send,
Executes
OP
on a value returned by init
with each item produced by
the iterator, in parallel. Read moresourcefn try_for_each<OP, R>(self, op: OP) -> Rwhere
OP: Fn(Self::Item) -> R + Sync + Send,
R: Try<Output = ()> + Send,
fn try_for_each<OP, R>(self, op: OP) -> Rwhere
OP: Fn(Self::Item) -> R + Sync + Send,
R: Try<Output = ()> + Send,
Executes a fallible
OP
on each item produced by the iterator, in parallel. Read moresourcefn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> Rwhere
OP: Fn(&mut T, Self::Item) -> R + Sync + Send,
T: Send + Clone,
R: Try<Output = ()> + Send,
fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> Rwhere
OP: Fn(&mut T, Self::Item) -> R + Sync + Send,
T: Send + Clone,
R: Try<Output = ()> + Send,
Executes a fallible
OP
on the given init
value with each item
produced by the iterator, in parallel. Read moresourcefn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> Rwhere
OP: Fn(&mut T, Self::Item) -> R + Sync + Send,
INIT: Fn() -> T + Sync + Send,
R: Try<Output = ()> + Send,
fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> Rwhere
OP: Fn(&mut T, Self::Item) -> R + Sync + Send,
INIT: Fn() -> T + Sync + Send,
R: Try<Output = ()> + Send,
Executes a fallible
OP
on a value returned by init
with each item
produced by the iterator, in parallel. Read moresourcefn map<F, R>(self, map_op: F) -> Map<Self, F>where
F: Fn(Self::Item) -> R + Sync + Send,
R: Send,
fn map<F, R>(self, map_op: F) -> Map<Self, F>where
F: Fn(Self::Item) -> R + Sync + Send,
R: Send,
Applies
map_op
to each item of this iterator, producing a new
iterator with the results. Read moresourcefn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>where
F: Fn(&mut T, Self::Item) -> R + Sync + Send,
T: Send + Clone,
R: Send,
fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>where
F: Fn(&mut T, Self::Item) -> R + Sync + Send,
T: Send + Clone,
R: Send,
Applies
map_op
to the given init
value with each item of this
iterator, producing a new iterator with the results. Read moresourcefn map_init<F, INIT, T, R>(self, init: INIT, map_op: F) -> MapInit<Self, INIT, F>where
F: Fn(&mut T, Self::Item) -> R + Sync + Send,
INIT: Fn() -> T + Sync + Send,
R: Send,
fn map_init<F, INIT, T, R>(self, init: INIT, map_op: F) -> MapInit<Self, INIT, F>where
F: Fn(&mut T, Self::Item) -> R + Sync + Send,
INIT: Fn() -> T + Sync + Send,
R: Send,
Applies
map_op
to a value returned by init
with each item of this
iterator, producing a new iterator with the results. Read moresourcefn cloned<'a, T>(self) -> Cloned<Self>where
T: 'a + Clone + Send,
Self: ParallelIterator<Item = &'a T>,
fn cloned<'a, T>(self) -> Cloned<Self>where
T: 'a + Clone + Send,
Self: ParallelIterator<Item = &'a T>,
sourcefn copied<'a, T>(self) -> Copied<Self>where
T: 'a + Copy + Send,
Self: ParallelIterator<Item = &'a T>,
fn copied<'a, T>(self) -> Copied<Self>where
T: 'a + Copy + Send,
Self: ParallelIterator<Item = &'a T>,
sourcefn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>where
OP: Fn(&Self::Item) + Sync + Send,
fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>where
OP: Fn(&Self::Item) + Sync + Send,
Applies
inspect_op
to a reference to each item of this iterator,
producing a new iterator passing through the original items. This is
often useful for debugging to see what’s happening in iterator stages. Read moresourcefn update<F>(self, update_op: F) -> Update<Self, F>where
F: Fn(&mut Self::Item) + Sync + Send,
fn update<F>(self, update_op: F) -> Update<Self, F>where
F: Fn(&mut Self::Item) + Sync + Send,
Mutates each item of this iterator before yielding it. Read more
sourcefn filter<P>(self, filter_op: P) -> Filter<Self, P>where
P: Fn(&Self::Item) -> bool + Sync + Send,
fn filter<P>(self, filter_op: P) -> Filter<Self, P>where
P: Fn(&Self::Item) -> bool + Sync + Send,
Applies
filter_op
to each item of this iterator, producing a new
iterator with only the items that gave true
results. Read moresourcefn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>where
P: Fn(Self::Item) -> Option<R> + Sync + Send,
R: Send,
fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>where
P: Fn(Self::Item) -> Option<R> + Sync + Send,
R: Send,
Applies
filter_op
to each item of this iterator to get an Option
,
producing a new iterator with only the items from Some
results. Read moresourcefn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>where
F: Fn(Self::Item) -> PI + Sync + Send,
PI: IntoParallelIterator,
fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>where
F: Fn(Self::Item) -> PI + Sync + Send,
PI: IntoParallelIterator,
Applies
map_op
to each item of this iterator to get nested parallel iterators,
producing a new parallel iterator that flattens these back into one. Read moresourcefn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>where
F: Fn(Self::Item) -> SI + Sync + Send,
SI: IntoIterator,
SI::Item: Send,
fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>where
F: Fn(Self::Item) -> SI + Sync + Send,
SI: IntoIterator,
SI::Item: Send,
Applies
map_op
to each item of this iterator to get nested serial iterators,
producing a new parallel iterator that flattens these back into one. Read moresourcefn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Itemwhere
OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,
ID: Fn() -> Self::Item + Sync + Send,
fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Itemwhere
OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,
ID: Fn() -> Self::Item + Sync + Send,
Reduces the items in the iterator into one item using
op
.
The argument identity
should be a closure that can produce
“identity” value which may be inserted into the sequence as
needed to create opportunities for parallel execution. So, for
example, if you are doing a summation, then identity()
ought
to produce something that represents the zero for your type
(but consider just calling sum()
in that case). Read moresourcefn reduce_with<OP>(self, op: OP) -> Option<Self::Item>where
OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,
fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>where
OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,
Reduces the items in the iterator into one item using
op
.
If the iterator is empty, None
is returned; otherwise,
Some
is returned. Read moresourcefn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>where
F: Fn(T, Self::Item) -> T + Sync + Send,
ID: Fn() -> T + Sync + Send,
T: Send,
fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>where
F: Fn(T, Self::Item) -> T + Sync + Send,
ID: Fn() -> T + Sync + Send,
T: Send,
Parallel fold is similar to sequential fold except that the
sequence of items may be subdivided before it is
folded. Consider a list of numbers like
22 3 77 89 46
. If
you used sequential fold to add them (fold(0, |a,b| a+b)
,
you would wind up first adding 0 + 22, then 22 + 3, then 25 +
77, and so forth. The parallel fold works similarly except
that it first breaks up your list into sublists, and hence
instead of yielding up a single sum at the end, it yields up
multiple sums. The number of results is nondeterministic, as
is the point where the breaks occur. Read moresourcefn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>where
F: Fn(T, Self::Item) -> T + Sync + Send,
T: Send + Clone,
fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>where
F: Fn(T, Self::Item) -> T + Sync + Send,
T: Send + Clone,
Applies
fold_op
to the given init
value with each item of this
iterator, finally producing the value for further use. Read moresourcefn try_fold<T, R, ID, F>(
self,
identity: ID,
fold_op: F
) -> TryFold<Self, R, ID, F>where
F: Fn(T, Self::Item) -> R + Sync + Send,
ID: Fn() -> T + Sync + Send,
R: Try<Output = T> + Send,
fn try_fold<T, R, ID, F>(
self,
identity: ID,
fold_op: F
) -> TryFold<Self, R, ID, F>where
F: Fn(T, Self::Item) -> R + Sync + Send,
ID: Fn() -> T + Sync + Send,
R: Try<Output = T> + Send,
Performs a fallible parallel fold. Read more
sourcefn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>where
F: Fn(T, Self::Item) -> R + Sync + Send,
R: Try<Output = T> + Send,
T: Clone + Send,
fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>where
F: Fn(T, Self::Item) -> R + Sync + Send,
R: Try<Output = T> + Send,
T: Clone + Send,
Performs a fallible parallel fold with a cloneable
init
value. Read moresourcefn sum<S>(self) -> Swhere
S: Send + Sum<Self::Item> + Sum<S>,
fn sum<S>(self) -> Swhere
S: Send + Sum<Self::Item> + Sum<S>,
Sums up the items in the iterator. Read more
sourcefn product<P>(self) -> Pwhere
P: Send + Product<Self::Item> + Product<P>,
fn product<P>(self) -> Pwhere
P: Send + Product<Self::Item> + Product<P>,
Multiplies all the items in the iterator. Read more
sourcefn min_by<F>(self, f: F) -> Option<Self::Item>where
F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,
fn min_by<F>(self, f: F) -> Option<Self::Item>where
F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,
Computes the minimum of all the items in the iterator with respect to
the given comparison function. If the iterator is empty,
None
is
returned; otherwise, Some(min)
is returned. Read moresourcefn min_by_key<K, F>(self, f: F) -> Option<Self::Item>where
K: Ord + Send,
F: Sync + Send + Fn(&Self::Item) -> K,
fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>where
K: Ord + Send,
F: Sync + Send + Fn(&Self::Item) -> K,
Computes the item that yields the minimum value for the given
function. If the iterator is empty,
None
is returned;
otherwise, Some(item)
is returned. Read moresourcefn max_by<F>(self, f: F) -> Option<Self::Item>where
F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,
fn max_by<F>(self, f: F) -> Option<Self::Item>where
F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,
Computes the maximum of all the items in the iterator with respect to
the given comparison function. If the iterator is empty,
None
is
returned; otherwise, Some(max)
is returned. Read moresourcefn max_by_key<K, F>(self, f: F) -> Option<Self::Item>where
K: Ord + Send,
F: Sync + Send + Fn(&Self::Item) -> K,
fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>where
K: Ord + Send,
F: Sync + Send + Fn(&Self::Item) -> K,
Computes the item that yields the maximum value for the given
function. If the iterator is empty,
None
is returned;
otherwise, Some(item)
is returned. Read moresourcefn chain<C>(self, chain: C) -> Chain<Self, C::Iter>where
C: IntoParallelIterator<Item = Self::Item>,
fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>where
C: IntoParallelIterator<Item = Self::Item>,
Takes two iterators and creates a new iterator over both. Read more
sourcefn find_any<P>(self, predicate: P) -> Option<Self::Item>where
P: Fn(&Self::Item) -> bool + Sync + Send,
fn find_any<P>(self, predicate: P) -> Option<Self::Item>where
P: Fn(&Self::Item) -> bool + Sync + Send,
Searches for some item in the parallel iterator that
matches the given predicate and returns it. This operation
is similar to
find
on sequential iterators but
the item returned may not be the first one in the parallel
sequence which matches, since we search the entire sequence in parallel. Read moresourcefn find_first<P>(self, predicate: P) -> Option<Self::Item>where
P: Fn(&Self::Item) -> bool + Sync + Send,
fn find_first<P>(self, predicate: P) -> Option<Self::Item>where
P: Fn(&Self::Item) -> bool + Sync + Send,
Searches for the sequentially first item in the parallel iterator
that matches the given predicate and returns it. Read more
sourcefn find_last<P>(self, predicate: P) -> Option<Self::Item>where
P: Fn(&Self::Item) -> bool + Sync + Send,
fn find_last<P>(self, predicate: P) -> Option<Self::Item>where
P: Fn(&Self::Item) -> bool + Sync + Send,
Searches for the sequentially last item in the parallel iterator
that matches the given predicate and returns it. Read more
sourcefn find_map_any<P, R>(self, predicate: P) -> Option<R>where
P: Fn(Self::Item) -> Option<R> + Sync + Send,
R: Send,
fn find_map_any<P, R>(self, predicate: P) -> Option<R>where
P: Fn(Self::Item) -> Option<R> + Sync + Send,
R: Send,
Applies the given predicate to the items in the parallel iterator
and returns any non-None result of the map operation. Read more
sourcefn find_map_first<P, R>(self, predicate: P) -> Option<R>where
P: Fn(Self::Item) -> Option<R> + Sync + Send,
R: Send,
fn find_map_first<P, R>(self, predicate: P) -> Option<R>where
P: Fn(Self::Item) -> Option<R> + Sync + Send,
R: Send,
Applies the given predicate to the items in the parallel iterator and
returns the sequentially first non-None result of the map operation. Read more
sourcefn find_map_last<P, R>(self, predicate: P) -> Option<R>where
P: Fn(Self::Item) -> Option<R> + Sync + Send,
R: Send,
fn find_map_last<P, R>(self, predicate: P) -> Option<R>where
P: Fn(Self::Item) -> Option<R> + Sync + Send,
R: Send,
Applies the given predicate to the items in the parallel iterator and
returns the sequentially last non-None result of the map operation. Read more
sourcefn any<P>(self, predicate: P) -> boolwhere
P: Fn(Self::Item) -> bool + Sync + Send,
fn any<P>(self, predicate: P) -> boolwhere
P: Fn(Self::Item) -> bool + Sync + Send,
Searches for some item in the parallel iterator that
matches the given predicate, and if so returns true. Once
a match is found, we’ll attempt to stop process the rest
of the items. Proving that there’s no match, returning false,
does require visiting every item. Read more
sourcefn all<P>(self, predicate: P) -> boolwhere
P: Fn(Self::Item) -> bool + Sync + Send,
fn all<P>(self, predicate: P) -> boolwhere
P: Fn(Self::Item) -> bool + Sync + Send,
Tests that every item in the parallel iterator matches the given
predicate, and if so returns true. If a counter-example is found,
we’ll attempt to stop processing more items, then return false. Read more
sourcefn while_some<T>(self) -> WhileSome<Self>where
Self: ParallelIterator<Item = Option<T>>,
T: Send,
fn while_some<T>(self) -> WhileSome<Self>where
Self: ParallelIterator<Item = Option<T>>,
T: Send,
Creates an iterator over the
Some
items of this iterator, halting
as soon as any None
is found. Read moresourcefn panic_fuse(self) -> PanicFuse<Self>
fn panic_fuse(self) -> PanicFuse<Self>
Wraps an iterator with a fuse in case of panics, to halt all threads
as soon as possible. Read more
sourcefn collect<C>(self) -> Cwhere
C: FromParallelIterator<Self::Item>,
fn collect<C>(self) -> Cwhere
C: FromParallelIterator<Self::Item>,
Creates a fresh collection containing all the elements produced
by this parallel iterator. Read more
sourcefn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)where
Self: ParallelIterator<Item = (A, B)>,
FromA: Default + Send + ParallelExtend<A>,
FromB: Default + Send + ParallelExtend<B>,
A: Send,
B: Send,
fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)where
Self: ParallelIterator<Item = (A, B)>,
FromA: Default + Send + ParallelExtend<A>,
FromB: Default + Send + ParallelExtend<B>,
A: Send,
B: Send,
Unzips the items of a parallel iterator into a pair of arbitrary
ParallelExtend
containers. Read moresourcefn partition<A, B, P>(self, predicate: P) -> (A, B)where
A: Default + Send + ParallelExtend<Self::Item>,
B: Default + Send + ParallelExtend<Self::Item>,
P: Fn(&Self::Item) -> bool + Sync + Send,
fn partition<A, B, P>(self, predicate: P) -> (A, B)where
A: Default + Send + ParallelExtend<Self::Item>,
B: Default + Send + ParallelExtend<Self::Item>,
P: Fn(&Self::Item) -> bool + Sync + Send,
Partitions the items of a parallel iterator into a pair of arbitrary
ParallelExtend
containers. Items for which the predicate
returns
true go into the first container, and the rest go into the second. Read moresourcefn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)where
A: Default + Send + ParallelExtend<L>,
B: Default + Send + ParallelExtend<R>,
P: Fn(Self::Item) -> Either<L, R> + Sync + Send,
L: Send,
R: Send,
fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)where
A: Default + Send + ParallelExtend<L>,
B: Default + Send + ParallelExtend<R>,
P: Fn(Self::Item) -> Either<L, R> + Sync + Send,
L: Send,
R: Send,
Partitions and maps the items of a parallel iterator into a pair of
arbitrary
ParallelExtend
containers. Either::Left
items go into
the first container, and Either::Right
items go into the second. Read moresourcefn take_any(self, n: usize) -> TakeAny<Self>
fn take_any(self, n: usize) -> TakeAny<Self>
Creates an iterator that yields
n
elements from anywhere in the original iterator. Read moresourcefn skip_any(self, n: usize) -> SkipAny<Self>
fn skip_any(self, n: usize) -> SkipAny<Self>
Creates an iterator that skips
n
elements from anywhere in the original iterator. Read moresourcefn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>where
P: Fn(&Self::Item) -> bool + Sync + Send,
fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>where
P: Fn(&Self::Item) -> bool + Sync + Send,
Creates an iterator that takes elements from anywhere in the original iterator
until the given
predicate
returns false
. Read moresourcefn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>where
P: Fn(&Self::Item) -> bool + Sync + Send,
fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>where
P: Fn(&Self::Item) -> bool + Sync + Send,
Creates an iterator that skips elements from anywhere in the original iterator
until the given
predicate
returns false
. Read moresourcefn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>
fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>
Collects this iterator into a linked list of vectors. Read more
sourceimpl<A> ParallelIterator for MultiZip<(A,)>where
A: IndexedParallelIterator,
impl<A> ParallelIterator for MultiZip<(A,)>where
A: IndexedParallelIterator,
type Item = (<A as ParallelIterator>::Item,)
type Item = (<A as ParallelIterator>::Item,)
sourcefn drive_unindexed<CONSUMER>(self, consumer: CONSUMER) -> CONSUMER::Resultwhere
CONSUMER: UnindexedConsumer<Self::Item>,
fn drive_unindexed<CONSUMER>(self, consumer: CONSUMER) -> CONSUMER::Resultwhere
CONSUMER: UnindexedConsumer<Self::Item>,
Internal method used to define the behavior of this parallel
iterator. You should not need to call this directly. Read more
sourcefn opt_len(&self) -> Option<usize>
fn opt_len(&self) -> Option<usize>
Internal method used to define the behavior of this parallel
iterator. You should not need to call this directly. Read more
sourcefn for_each<OP>(self, op: OP)where
OP: Fn(Self::Item) + Sync + Send,
fn for_each<OP>(self, op: OP)where
OP: Fn(Self::Item) + Sync + Send,
Executes
OP
on each item produced by the iterator, in parallel. Read moresourcefn for_each_with<OP, T>(self, init: T, op: OP)where
OP: Fn(&mut T, Self::Item) + Sync + Send,
T: Send + Clone,
fn for_each_with<OP, T>(self, init: T, op: OP)where
OP: Fn(&mut T, Self::Item) + Sync + Send,
T: Send + Clone,
sourcefn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)where
OP: Fn(&mut T, Self::Item) + Sync + Send,
INIT: Fn() -> T + Sync + Send,
fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP)where
OP: Fn(&mut T, Self::Item) + Sync + Send,
INIT: Fn() -> T + Sync + Send,
Executes
OP
on a value returned by init
with each item produced by
the iterator, in parallel. Read moresourcefn try_for_each<OP, R>(self, op: OP) -> Rwhere
OP: Fn(Self::Item) -> R + Sync + Send,
R: Try<Output = ()> + Send,
fn try_for_each<OP, R>(self, op: OP) -> Rwhere
OP: Fn(Self::Item) -> R + Sync + Send,
R: Try<Output = ()> + Send,
Executes a fallible
OP
on each item produced by the iterator, in parallel. Read moresourcefn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> Rwhere
OP: Fn(&mut T, Self::Item) -> R + Sync + Send,
T: Send + Clone,
R: Try<Output = ()> + Send,
fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> Rwhere
OP: Fn(&mut T, Self::Item) -> R + Sync + Send,
T: Send + Clone,
R: Try<Output = ()> + Send,
Executes a fallible
OP
on the given init
value with each item
produced by the iterator, in parallel. Read moresourcefn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> Rwhere
OP: Fn(&mut T, Self::Item) -> R + Sync + Send,
INIT: Fn() -> T + Sync + Send,
R: Try<Output = ()> + Send,
fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> Rwhere
OP: Fn(&mut T, Self::Item) -> R + Sync + Send,
INIT: Fn() -> T + Sync + Send,
R: Try<Output = ()> + Send,
Executes a fallible
OP
on a value returned by init
with each item
produced by the iterator, in parallel. Read moresourcefn map<F, R>(self, map_op: F) -> Map<Self, F>where
F: Fn(Self::Item) -> R + Sync + Send,
R: Send,
fn map<F, R>(self, map_op: F) -> Map<Self, F>where
F: Fn(Self::Item) -> R + Sync + Send,
R: Send,
Applies
map_op
to each item of this iterator, producing a new
iterator with the results. Read moresourcefn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>where
F: Fn(&mut T, Self::Item) -> R + Sync + Send,
T: Send + Clone,
R: Send,
fn map_with<F, T, R>(self, init: T, map_op: F) -> MapWith<Self, T, F>where
F: Fn(&mut T, Self::Item) -> R + Sync + Send,
T: Send + Clone,
R: Send,
Applies
map_op
to the given init
value with each item of this
iterator, producing a new iterator with the results. Read moresourcefn map_init<F, INIT, T, R>(self, init: INIT, map_op: F) -> MapInit<Self, INIT, F>where
F: Fn(&mut T, Self::Item) -> R + Sync + Send,
INIT: Fn() -> T + Sync + Send,
R: Send,
fn map_init<F, INIT, T, R>(self, init: INIT, map_op: F) -> MapInit<Self, INIT, F>where
F: Fn(&mut T, Self::Item) -> R + Sync + Send,
INIT: Fn() -> T + Sync + Send,
R: Send,
Applies
map_op
to a value returned by init
with each item of this
iterator, producing a new iterator with the results. Read moresourcefn cloned<'a, T>(self) -> Cloned<Self>where
T: 'a + Clone + Send,
Self: ParallelIterator<Item = &'a T>,
fn cloned<'a, T>(self) -> Cloned<Self>where
T: 'a + Clone + Send,
Self: ParallelIterator<Item = &'a T>,
sourcefn copied<'a, T>(self) -> Copied<Self>where
T: 'a + Copy + Send,
Self: ParallelIterator<Item = &'a T>,
fn copied<'a, T>(self) -> Copied<Self>where
T: 'a + Copy + Send,
Self: ParallelIterator<Item = &'a T>,
sourcefn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>where
OP: Fn(&Self::Item) + Sync + Send,
fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP>where
OP: Fn(&Self::Item) + Sync + Send,
Applies
inspect_op
to a reference to each item of this iterator,
producing a new iterator passing through the original items. This is
often useful for debugging to see what’s happening in iterator stages. Read moresourcefn update<F>(self, update_op: F) -> Update<Self, F>where
F: Fn(&mut Self::Item) + Sync + Send,
fn update<F>(self, update_op: F) -> Update<Self, F>where
F: Fn(&mut Self::Item) + Sync + Send,
Mutates each item of this iterator before yielding it. Read more
sourcefn filter<P>(self, filter_op: P) -> Filter<Self, P>where
P: Fn(&Self::Item) -> bool + Sync + Send,
fn filter<P>(self, filter_op: P) -> Filter<Self, P>where
P: Fn(&Self::Item) -> bool + Sync + Send,
Applies
filter_op
to each item of this iterator, producing a new
iterator with only the items that gave true
results. Read moresourcefn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>where
P: Fn(Self::Item) -> Option<R> + Sync + Send,
R: Send,
fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P>where
P: Fn(Self::Item) -> Option<R> + Sync + Send,
R: Send,
Applies
filter_op
to each item of this iterator to get an Option
,
producing a new iterator with only the items from Some
results. Read moresourcefn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>where
F: Fn(Self::Item) -> PI + Sync + Send,
PI: IntoParallelIterator,
fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F>where
F: Fn(Self::Item) -> PI + Sync + Send,
PI: IntoParallelIterator,
Applies
map_op
to each item of this iterator to get nested parallel iterators,
producing a new parallel iterator that flattens these back into one. Read moresourcefn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>where
F: Fn(Self::Item) -> SI + Sync + Send,
SI: IntoIterator,
SI::Item: Send,
fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F>where
F: Fn(Self::Item) -> SI + Sync + Send,
SI: IntoIterator,
SI::Item: Send,
Applies
map_op
to each item of this iterator to get nested serial iterators,
producing a new parallel iterator that flattens these back into one. Read moresourcefn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Itemwhere
OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,
ID: Fn() -> Self::Item + Sync + Send,
fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Itemwhere
OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,
ID: Fn() -> Self::Item + Sync + Send,
Reduces the items in the iterator into one item using
op
.
The argument identity
should be a closure that can produce
“identity” value which may be inserted into the sequence as
needed to create opportunities for parallel execution. So, for
example, if you are doing a summation, then identity()
ought
to produce something that represents the zero for your type
(but consider just calling sum()
in that case). Read moresourcefn reduce_with<OP>(self, op: OP) -> Option<Self::Item>where
OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,
fn reduce_with<OP>(self, op: OP) -> Option<Self::Item>where
OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,
Reduces the items in the iterator into one item using
op
.
If the iterator is empty, None
is returned; otherwise,
Some
is returned. Read moresourcefn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>where
F: Fn(T, Self::Item) -> T + Sync + Send,
ID: Fn() -> T + Sync + Send,
T: Send,
fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F>where
F: Fn(T, Self::Item) -> T + Sync + Send,
ID: Fn() -> T + Sync + Send,
T: Send,
Parallel fold is similar to sequential fold except that the
sequence of items may be subdivided before it is
folded. Consider a list of numbers like
22 3 77 89 46
. If
you used sequential fold to add them (fold(0, |a,b| a+b)
,
you would wind up first adding 0 + 22, then 22 + 3, then 25 +
77, and so forth. The parallel fold works similarly except
that it first breaks up your list into sublists, and hence
instead of yielding up a single sum at the end, it yields up
multiple sums. The number of results is nondeterministic, as
is the point where the breaks occur. Read moresourcefn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>where
F: Fn(T, Self::Item) -> T + Sync + Send,
T: Send + Clone,
fn fold_with<F, T>(self, init: T, fold_op: F) -> FoldWith<Self, T, F>where
F: Fn(T, Self::Item) -> T + Sync + Send,
T: Send + Clone,
Applies
fold_op
to the given init
value with each item of this
iterator, finally producing the value for further use. Read moresourcefn try_fold<T, R, ID, F>(
self,
identity: ID,
fold_op: F
) -> TryFold<Self, R, ID, F>where
F: Fn(T, Self::Item) -> R + Sync + Send,
ID: Fn() -> T + Sync + Send,
R: Try<Output = T> + Send,
fn try_fold<T, R, ID, F>(
self,
identity: ID,
fold_op: F
) -> TryFold<Self, R, ID, F>where
F: Fn(T, Self::Item) -> R + Sync + Send,
ID: Fn() -> T + Sync + Send,
R: Try<Output = T> + Send,
Performs a fallible parallel fold. Read more
sourcefn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>where
F: Fn(T, Self::Item) -> R + Sync + Send,
R: Try<Output = T> + Send,
T: Clone + Send,
fn try_fold_with<F, T, R>(self, init: T, fold_op: F) -> TryFoldWith<Self, R, F>where
F: Fn(T, Self::Item) -> R + Sync + Send,
R: Try<Output = T> + Send,
T: Clone + Send,
Performs a fallible parallel fold with a cloneable
init
value. Read moresourcefn sum<S>(self) -> Swhere
S: Send + Sum<Self::Item> + Sum<S>,
fn sum<S>(self) -> Swhere
S: Send + Sum<Self::Item> + Sum<S>,
Sums up the items in the iterator. Read more
sourcefn product<P>(self) -> Pwhere
P: Send + Product<Self::Item> + Product<P>,
fn product<P>(self) -> Pwhere
P: Send + Product<Self::Item> + Product<P>,
Multiplies all the items in the iterator. Read more
sourcefn min_by<F>(self, f: F) -> Option<Self::Item>where
F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,
fn min_by<F>(self, f: F) -> Option<Self::Item>where
F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,
Computes the minimum of all the items in the iterator with respect to
the given comparison function. If the iterator is empty,
None
is
returned; otherwise, Some(min)
is returned. Read moresourcefn min_by_key<K, F>(self, f: F) -> Option<Self::Item>where
K: Ord + Send,
F: Sync + Send + Fn(&Self::Item) -> K,
fn min_by_key<K, F>(self, f: F) -> Option<Self::Item>where
K: Ord + Send,
F: Sync + Send + Fn(&Self::Item) -> K,
Computes the item that yields the minimum value for the given
function. If the iterator is empty,
None
is returned;
otherwise, Some(item)
is returned. Read moresourcefn max_by<F>(self, f: F) -> Option<Self::Item>where
F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,
fn max_by<F>(self, f: F) -> Option<Self::Item>where
F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,
Computes the maximum of all the items in the iterator with respect to
the given comparison function. If the iterator is empty,
None
is
returned; otherwise, Some(max)
is returned. Read moresourcefn max_by_key<K, F>(self, f: F) -> Option<Self::Item>where
K: Ord + Send,
F: Sync + Send + Fn(&Self::Item) -> K,
fn max_by_key<K, F>(self, f: F) -> Option<Self::Item>where
K: Ord + Send,
F: Sync + Send + Fn(&Self::Item) -> K,
Computes the item that yields the maximum value for the given
function. If the iterator is empty,
None
is returned;
otherwise, Some(item)
is returned. Read moresourcefn chain<C>(self, chain: C) -> Chain<Self, C::Iter>where
C: IntoParallelIterator<Item = Self::Item>,
fn chain<C>(self, chain: C) -> Chain<Self, C::Iter>where
C: IntoParallelIterator<Item = Self::Item>,
Takes two iterators and creates a new iterator over both. Read more
sourcefn find_any<P>(self, predicate: P) -> Option<Self::Item>where
P: Fn(&Self::Item) -> bool + Sync + Send,
fn find_any<P>(self, predicate: P) -> Option<Self::Item>where
P: Fn(&Self::Item) -> bool + Sync + Send,
Searches for some item in the parallel iterator that
matches the given predicate and returns it. This operation
is similar to
find
on sequential iterators but
the item returned may not be the first one in the parallel
sequence which matches, since we search the entire sequence in parallel. Read moresourcefn find_first<P>(self, predicate: P) -> Option<Self::Item>where
P: Fn(&Self::Item) -> bool + Sync + Send,
fn find_first<P>(self, predicate: P) -> Option<Self::Item>where
P: Fn(&Self::Item) -> bool + Sync + Send,
Searches for the sequentially first item in the parallel iterator
that matches the given predicate and returns it. Read more
sourcefn find_last<P>(self, predicate: P) -> Option<Self::Item>where
P: Fn(&Self::Item) -> bool + Sync + Send,
fn find_last<P>(self, predicate: P) -> Option<Self::Item>where
P: Fn(&Self::Item) -> bool + Sync + Send,
Searches for the sequentially last item in the parallel iterator
that matches the given predicate and returns it. Read more
sourcefn find_map_any<P, R>(self, predicate: P) -> Option<R>where
P: Fn(Self::Item) -> Option<R> + Sync + Send,
R: Send,
fn find_map_any<P, R>(self, predicate: P) -> Option<R>where
P: Fn(Self::Item) -> Option<R> + Sync + Send,
R: Send,
Applies the given predicate to the items in the parallel iterator
and returns any non-None result of the map operation. Read more
sourcefn find_map_first<P, R>(self, predicate: P) -> Option<R>where
P: Fn(Self::Item) -> Option<R> + Sync + Send,
R: Send,
fn find_map_first<P, R>(self, predicate: P) -> Option<R>where
P: Fn(Self::Item) -> Option<R> + Sync + Send,
R: Send,
Applies the given predicate to the items in the parallel iterator and
returns the sequentially first non-None result of the map operation. Read more
sourcefn find_map_last<P, R>(self, predicate: P) -> Option<R>where
P: Fn(Self::Item) -> Option<R> + Sync + Send,
R: Send,
fn find_map_last<P, R>(self, predicate: P) -> Option<R>where
P: Fn(Self::Item) -> Option<R> + Sync + Send,
R: Send,
Applies the given predicate to the items in the parallel iterator and
returns the sequentially last non-None result of the map operation. Read more
sourcefn any<P>(self, predicate: P) -> boolwhere
P: Fn(Self::Item) -> bool + Sync + Send,
fn any<P>(self, predicate: P) -> boolwhere
P: Fn(Self::Item) -> bool + Sync + Send,
Searches for some item in the parallel iterator that
matches the given predicate, and if so returns true. Once
a match is found, we’ll attempt to stop process the rest
of the items. Proving that there’s no match, returning false,
does require visiting every item. Read more
sourcefn all<P>(self, predicate: P) -> boolwhere
P: Fn(Self::Item) -> bool + Sync + Send,
fn all<P>(self, predicate: P) -> boolwhere
P: Fn(Self::Item) -> bool + Sync + Send,
Tests that every item in the parallel iterator matches the given
predicate, and if so returns true. If a counter-example is found,
we’ll attempt to stop processing more items, then return false. Read more
sourcefn while_some<T>(self) -> WhileSome<Self>where
Self: ParallelIterator<Item = Option<T>>,
T: Send,
fn while_some<T>(self) -> WhileSome<Self>where
Self: ParallelIterator<Item = Option<T>>,
T: Send,
Creates an iterator over the
Some
items of this iterator, halting
as soon as any None
is found. Read moresourcefn panic_fuse(self) -> PanicFuse<Self>
fn panic_fuse(self) -> PanicFuse<Self>
Wraps an iterator with a fuse in case of panics, to halt all threads
as soon as possible. Read more
sourcefn collect<C>(self) -> Cwhere
C: FromParallelIterator<Self::Item>,
fn collect<C>(self) -> Cwhere
C: FromParallelIterator<Self::Item>,
Creates a fresh collection containing all the elements produced
by this parallel iterator. Read more
sourcefn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)where
Self: ParallelIterator<Item = (A, B)>,
FromA: Default + Send + ParallelExtend<A>,
FromB: Default + Send + ParallelExtend<B>,
A: Send,
B: Send,
fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)where
Self: ParallelIterator<Item = (A, B)>,
FromA: Default + Send + ParallelExtend<A>,
FromB: Default + Send + ParallelExtend<B>,
A: Send,
B: Send,
Unzips the items of a parallel iterator into a pair of arbitrary
ParallelExtend
containers. Read moresourcefn partition<A, B, P>(self, predicate: P) -> (A, B)where
A: Default + Send + ParallelExtend<Self::Item>,
B: Default + Send + ParallelExtend<Self::Item>,
P: Fn(&Self::Item) -> bool + Sync + Send,
fn partition<A, B, P>(self, predicate: P) -> (A, B)where
A: Default + Send + ParallelExtend<Self::Item>,
B: Default + Send + ParallelExtend<Self::Item>,
P: Fn(&Self::Item) -> bool + Sync + Send,
Partitions the items of a parallel iterator into a pair of arbitrary
ParallelExtend
containers. Items for which the predicate
returns
true go into the first container, and the rest go into the second. Read moresourcefn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)where
A: Default + Send + ParallelExtend<L>,
B: Default + Send + ParallelExtend<R>,
P: Fn(Self::Item) -> Either<L, R> + Sync + Send,
L: Send,
R: Send,
fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B)where
A: Default + Send + ParallelExtend<L>,
B: Default + Send + ParallelExtend<R>,
P: Fn(Self::Item) -> Either<L, R> + Sync + Send,
L: Send,
R: Send,
Partitions and maps the items of a parallel iterator into a pair of
arbitrary
ParallelExtend
containers. Either::Left
items go into
the first container, and Either::Right
items go into the second. Read moresourcefn take_any(self, n: usize) -> TakeAny<Self>
fn take_any(self, n: usize) -> TakeAny<Self>
Creates an iterator that yields
n
elements from anywhere in the original iterator. Read moresourcefn skip_any(self, n: usize) -> SkipAny<Self>
fn skip_any(self, n: usize) -> SkipAny<Self>
Creates an iterator that skips
n
elements from anywhere in the original iterator. Read moresourcefn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>where
P: Fn(&Self::Item) -> bool + Sync + Send,
fn take_any_while<P>(self, predicate: P) -> TakeAnyWhile<Self, P>where
P: Fn(&Self::Item) -> bool + Sync + Send,
Creates an iterator that takes elements from anywhere in the original iterator
until the given
predicate
returns false
. Read moresourcefn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>where
P: Fn(&Self::Item) -> bool + Sync + Send,
fn skip_any_while<P>(self, predicate: P) -> SkipAnyWhile<Self, P>where
P: Fn(&Self::Item) -> bool + Sync + Send,
Creates an iterator that skips elements from anywhere in the original iterator
until the given
predicate
returns false
. Read moresourcefn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>
fn collect_vec_list(self) -> LinkedList<Vec<Self::Item>>
Collects this iterator into a linked list of vectors. Read more
Auto Trait Implementations
impl<T> RefUnwindSafe for MultiZip<T>where
T: RefUnwindSafe,
impl<T> Send for MultiZip<T>where
T: Send,
impl<T> Sync for MultiZip<T>where
T: Sync,
impl<T> Unpin for MultiZip<T>where
T: Unpin,
impl<T> UnwindSafe for MultiZip<T>where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> IntoParallelIterator for Twhere
T: ParallelIterator,
impl<T> IntoParallelIterator for Twhere
T: ParallelIterator,
type Iter = T
type Iter = T
The parallel iterator type that will be created.
type Item = <T as ParallelIterator>::Item
type Item = <T as ParallelIterator>::Item
The type of item that the parallel iterator will produce.
sourcefn into_par_iter(self) -> T
fn into_par_iter(self) -> T
Converts
self
into a parallel iterator. Read more