Struct indexmap::map::rayon::ParValuesMut [−][src]
pub struct ParValuesMut<'a, K, V> { /* fields omitted */ }
A parallel mutable iterator over the values of a IndexMap
.
This struct
is created by the par_values_mut
method on IndexMap
. See its
documentation for more.
Trait Implementations
impl<K: Send, V: Send> IndexedParallelIterator for ParValuesMut<'_, K, V>
[src][+]
fn drive<C>(self, consumer: C) -> C::Result where
C: Consumer<Self::Item>,
[src][−]
C: Consumer<Self::Item>,
Internal method used to define the behavior of this parallel iterator. You should not need to call this directly. Read more
fn len(&self) -> usize
[src][−]
Produces an exact count of how many items this iterator will produce, presuming no panic occurs. Read more
fn with_producer<CB>(self, callback: CB) -> CB::Output where
CB: ProducerCallback<Self::Item>,
[src][−]
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
pub fn collect_into_vec(self, target: &mut Vec<Self::Item, Global>)
[src][−]
Collects the results of the iterator into the specified vector. The vector is always truncated before execution begins. If possible, reusing the vector across calls can lead to better performance since it reuses the same backing buffer. Read more
pub fn unzip_into_vecs<A, B>(
self,
left: &mut Vec<A, Global>,
right: &mut Vec<B, Global>
) where
Self: IndexedParallelIterator<Item = (A, B)>,
A: Send,
B: Send,
[src][−]
self,
left: &mut Vec<A, Global>,
right: &mut Vec<B, Global>
) where
Self: IndexedParallelIterator<Item = (A, B)>,
A: Send,
B: Send,
Unzips the results of the iterator into the specified vectors. The vectors are always truncated before execution begins. If possible, reusing the vectors across calls can lead to better performance since they reuse the same backing buffer. Read more
pub fn zip<Z>(self, zip_op: Z) -> Zip<Self, <Z as IntoParallelIterator>::Iter> where
Z: IntoParallelIterator,
<Z as IntoParallelIterator>::Iter: IndexedParallelIterator,
[src][−]
Z: IntoParallelIterator,
<Z as IntoParallelIterator>::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 more
pub fn zip_eq<Z>(
self,
zip_op: Z
) -> ZipEq<Self, <Z as IntoParallelIterator>::Iter> where
Z: IntoParallelIterator,
<Z as IntoParallelIterator>::Iter: IndexedParallelIterator,
[src][−]
self,
zip_op: Z
) -> ZipEq<Self, <Z as IntoParallelIterator>::Iter> where
Z: IntoParallelIterator,
<Z as IntoParallelIterator>::Iter: IndexedParallelIterator,
The same as Zip
, but requires that both iterators have the same length. Read more
pub fn interleave<I>(
self,
other: I
) -> Interleave<Self, <I as IntoParallelIterator>::Iter> where
I: IntoParallelIterator<Item = Self::Item>,
<I as IntoParallelIterator>::Iter: IndexedParallelIterator,
<<I as IntoParallelIterator>::Iter as ParallelIterator>::Item == Self::Item,
[src][−]
self,
other: I
) -> Interleave<Self, <I as IntoParallelIterator>::Iter> where
I: IntoParallelIterator<Item = Self::Item>,
<I as IntoParallelIterator>::Iter: IndexedParallelIterator,
<<I as IntoParallelIterator>::Iter as ParallelIterator>::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
pub fn interleave_shortest<I>(
self,
other: I
) -> InterleaveShortest<Self, <I as IntoParallelIterator>::Iter> where
I: IntoParallelIterator<Item = Self::Item>,
<I as IntoParallelIterator>::Iter: IndexedParallelIterator,
<<I as IntoParallelIterator>::Iter as ParallelIterator>::Item == Self::Item,
[src][−]
self,
other: I
) -> InterleaveShortest<Self, <I as IntoParallelIterator>::Iter> where
I: IntoParallelIterator<Item = Self::Item>,
<I as IntoParallelIterator>::Iter: IndexedParallelIterator,
<<I as IntoParallelIterator>::Iter as ParallelIterator>::Item == Self::Item,
Interleaves elements of this iterator and the other given iterator, until one is exhausted. Read more
pub fn chunks(self, chunk_size: usize) -> Chunks<Self>
[src][−]
Splits an iterator up into fixed-size chunks. Read more
pub fn cmp<I>(self, other: I) -> Ordering where
I: IntoParallelIterator<Item = Self::Item>,
<I as IntoParallelIterator>::Iter: IndexedParallelIterator,
Self::Item: Ord,
[src][−]
I: IntoParallelIterator<Item = Self::Item>,
<I as IntoParallelIterator>::Iter: IndexedParallelIterator,
Self::Item: Ord,
Lexicographically compares the elements of this ParallelIterator
with those of
another. Read more
pub fn partial_cmp<I>(self, other: I) -> Option<Ordering> where
I: IntoParallelIterator,
<I as IntoParallelIterator>::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<<I as IntoParallelIterator>::Item>,
[src][−]
I: IntoParallelIterator,
<I as IntoParallelIterator>::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<<I as IntoParallelIterator>::Item>,
Lexicographically compares the elements of this ParallelIterator
with those of
another. Read more
pub fn eq<I>(self, other: I) -> bool where
I: IntoParallelIterator,
<I as IntoParallelIterator>::Iter: IndexedParallelIterator,
Self::Item: PartialEq<<I as IntoParallelIterator>::Item>,
[src][−]
I: IntoParallelIterator,
<I as IntoParallelIterator>::Iter: IndexedParallelIterator,
Self::Item: PartialEq<<I as IntoParallelIterator>::Item>,
Determines if the elements of this ParallelIterator
are equal to those of another Read more
pub fn ne<I>(self, other: I) -> bool where
I: IntoParallelIterator,
<I as IntoParallelIterator>::Iter: IndexedParallelIterator,
Self::Item: PartialEq<<I as IntoParallelIterator>::Item>,
[src][−]
I: IntoParallelIterator,
<I as IntoParallelIterator>::Iter: IndexedParallelIterator,
Self::Item: PartialEq<<I as IntoParallelIterator>::Item>,
Determines if the elements of this ParallelIterator
are unequal to those of another Read more
pub fn lt<I>(self, other: I) -> bool where
I: IntoParallelIterator,
<I as IntoParallelIterator>::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<<I as IntoParallelIterator>::Item>,
[src][−]
I: IntoParallelIterator,
<I as IntoParallelIterator>::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<<I as IntoParallelIterator>::Item>,
Determines if the elements of this ParallelIterator
are lexicographically less than those of another. Read more
pub fn le<I>(self, other: I) -> bool where
I: IntoParallelIterator,
<I as IntoParallelIterator>::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<<I as IntoParallelIterator>::Item>,
[src][−]
I: IntoParallelIterator,
<I as IntoParallelIterator>::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<<I as IntoParallelIterator>::Item>,
Determines if the elements of this ParallelIterator
are less or equal to those of another. Read more
pub fn gt<I>(self, other: I) -> bool where
I: IntoParallelIterator,
<I as IntoParallelIterator>::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<<I as IntoParallelIterator>::Item>,
[src][−]
I: IntoParallelIterator,
<I as IntoParallelIterator>::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<<I as IntoParallelIterator>::Item>,
Determines if the elements of this ParallelIterator
are lexicographically greater than those of another. Read more
pub fn ge<I>(self, other: I) -> bool where
I: IntoParallelIterator,
<I as IntoParallelIterator>::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<<I as IntoParallelIterator>::Item>,
[src][−]
I: IntoParallelIterator,
<I as IntoParallelIterator>::Iter: IndexedParallelIterator,
Self::Item: PartialOrd<<I as IntoParallelIterator>::Item>,
Determines if the elements of this ParallelIterator
are less or equal to those of another. Read more
pub fn enumerate(self) -> Enumerate<Self>
[src][−]
Yields an index along with each item. Read more
pub fn step_by(self, step: usize) -> StepBy<Self>
[src][−]
Creates an iterator that steps by the given amount Read more
pub fn skip(self, n: usize) -> Skip<Self>
[src][−]
Creates an iterator that skips the first n
elements. Read more
pub fn take(self, n: usize) -> Take<Self>
[src][−]
Creates an iterator that yields the first n
elements. Read more
pub fn position_any<P>(self, predicate: P) -> Option<usize> where
P: Fn(Self::Item) -> bool + Sync + Send,
[src][−]
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 more
pub fn position_first<P>(self, predicate: P) -> Option<usize> where
P: Fn(Self::Item) -> bool + Sync + Send,
[src][−]
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
pub fn position_last<P>(self, predicate: P) -> Option<usize> where
P: Fn(Self::Item) -> bool + Sync + Send,
[src][−]
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
pub fn positions<P>(self, predicate: P) -> Positions<Self, P> where
P: Fn(Self::Item) -> bool + Sync + Send,
[src][−]
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
pub fn rev(self) -> Rev<Self>
[src][−]
Produces a new iterator with the elements of this iterator in reverse order. Read more
pub fn with_min_len(self, min: usize) -> MinLen<Self>
[src][−]
Sets the minimum length of iterators desired to process in each thread. Rayon will not split any smaller than this length, but of course an iterator could already be smaller to begin with. Read more
pub fn with_max_len(self, max: usize) -> MaxLen<Self>
[src][−]
Sets the maximum length of iterators desired to process in each
thread. 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 more
impl<'a, K: Send, V: Send> ParallelIterator for ParValuesMut<'a, K, V>
[src][+]
type Item = &'a mut V
The type of item that this parallel iterator produces.
For example, if you use the for_each
method, this is the type of
item that your closure will be invoked with. Read more
fn drive_unindexed<C>(self, consumer: C) -> C::Result where
C: UnindexedConsumer<Self::Item>,
[src][−]
C: UnindexedConsumer<Self::Item>,
Internal method used to define the behavior of this parallel iterator. You should not need to call this directly. Read more
fn opt_len(&self) -> Option<usize>
[src][−]
Internal method used to define the behavior of this parallel iterator. You should not need to call this directly. Read more
pub fn for_each<OP>(self, op: OP) where
OP: Fn(Self::Item) + Sync + Send,
[src][−]
OP: Fn(Self::Item) + Sync + Send,
Executes OP
on each item produced by the iterator, in parallel. Read more
pub fn for_each_with<OP, T>(self, init: T, op: OP) where
T: Send + Clone,
OP: Fn(&mut T, Self::Item) + Sync + Send,
[src][−]
T: Send + Clone,
OP: Fn(&mut T, Self::Item) + Sync + Send,
Executes OP
on the given init
value with each item produced by
the iterator, in parallel. Read more
pub fn for_each_init<OP, INIT, T>(self, init: INIT, op: OP) where
INIT: Fn() -> T + Sync + Send,
OP: Fn(&mut T, Self::Item) + Sync + Send,
[src][−]
INIT: Fn() -> T + Sync + Send,
OP: Fn(&mut T, Self::Item) + Sync + Send,
Executes OP
on a value returned by init
with each item produced by
the iterator, in parallel. Read more
pub fn try_for_each<OP, R>(self, op: OP) -> R where
R: Try<Ok = ()> + Send,
OP: Fn(Self::Item) -> R + Sync + Send,
[src][−]
R: Try<Ok = ()> + Send,
OP: Fn(Self::Item) -> R + Sync + Send,
Executes a fallible OP
on each item produced by the iterator, in parallel. Read more
pub fn try_for_each_with<OP, T, R>(self, init: T, op: OP) -> R where
R: Try<Ok = ()> + Send,
T: Send + Clone,
OP: Fn(&mut T, Self::Item) -> R + Sync + Send,
[src][−]
R: Try<Ok = ()> + Send,
T: Send + Clone,
OP: Fn(&mut T, Self::Item) -> R + Sync + Send,
Executes a fallible OP
on the given init
value with each item
produced by the iterator, in parallel. Read more
pub fn try_for_each_init<OP, INIT, T, R>(self, init: INIT, op: OP) -> R where
R: Try<Ok = ()> + Send,
INIT: Fn() -> T + Sync + Send,
OP: Fn(&mut T, Self::Item) -> R + Sync + Send,
[src][−]
R: Try<Ok = ()> + Send,
INIT: Fn() -> T + Sync + Send,
OP: Fn(&mut T, Self::Item) -> R + Sync + Send,
Executes a fallible OP
on a value returned by init
with each item
produced by the iterator, in parallel. Read more
pub fn count(self) -> usize
[src][−]
Counts the number of items in this parallel iterator. Read more
pub fn map<F, R>(self, map_op: F) -> Map<Self, F> where
F: Fn(Self::Item) -> R + Sync + Send,
R: Send,
[src][−]
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 more
pub 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,
R: Send,
T: Send + Clone,
[src][−]
F: Fn(&mut T, Self::Item) -> R + Sync + Send,
R: Send,
T: Send + Clone,
Applies map_op
to the given init
value with each item of this
iterator, producing a new iterator with the results. Read more
pub 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,
R: Send,
INIT: Fn() -> T + Sync + Send,
[src][−]
self,
init: INIT,
map_op: F
) -> MapInit<Self, INIT, F> where
F: Fn(&mut T, Self::Item) -> R + Sync + Send,
R: Send,
INIT: Fn() -> T + Sync + Send,
Applies map_op
to a value returned by init
with each item of this
iterator, producing a new iterator with the results. Read more
pub fn cloned<'a, T>(self) -> Cloned<Self> where
Self: ParallelIterator<Item = &'a T>,
T: 'a + Clone + Send,
[src][−]
Self: ParallelIterator<Item = &'a T>,
T: 'a + Clone + Send,
Creates an iterator which clones all of its elements. This may be
useful when you have an iterator over &T
, but you need T
, and
that type implements Clone
. See also copied()
. Read more
pub fn copied<'a, T>(self) -> Copied<Self> where
Self: ParallelIterator<Item = &'a T>,
T: 'a + Copy + Send,
[src][−]
Self: ParallelIterator<Item = &'a T>,
T: 'a + Copy + Send,
Creates an iterator which copies all of its elements. This may be
useful when you have an iterator over &T
, but you need T
, and
that type implements Copy
. See also cloned()
. Read more
pub fn inspect<OP>(self, inspect_op: OP) -> Inspect<Self, OP> where
OP: Fn(&Self::Item) + Sync + Send,
[src][−]
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 more
pub fn update<F>(self, update_op: F) -> Update<Self, F> where
F: Fn(&mut Self::Item) + Sync + Send,
[src][−]
F: Fn(&mut Self::Item) + Sync + Send,
Mutates each item of this iterator before yielding it. Read more
pub fn filter<P>(self, filter_op: P) -> Filter<Self, P> where
P: Fn(&Self::Item) -> bool + Sync + Send,
[src][−]
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 more
pub fn filter_map<P, R>(self, filter_op: P) -> FilterMap<Self, P> where
R: Send,
P: Fn(Self::Item) -> Option<R> + Sync + Send,
[src][−]
R: Send,
P: Fn(Self::Item) -> Option<R> + Sync + 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 more
pub fn flat_map<F, PI>(self, map_op: F) -> FlatMap<Self, F> where
F: Fn(Self::Item) -> PI + Sync + Send,
PI: IntoParallelIterator,
[src][−]
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 more
pub fn flat_map_iter<F, SI>(self, map_op: F) -> FlatMapIter<Self, F> where
F: Fn(Self::Item) -> SI + Sync + Send,
SI: IntoIterator,
<SI as IntoIterator>::Item: Send,
[src][−]
F: Fn(Self::Item) -> SI + Sync + Send,
SI: IntoIterator,
<SI as IntoIterator>::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 more
pub fn flatten(self) -> Flatten<Self> where
Self::Item: IntoParallelIterator,
[src][−]
Self::Item: IntoParallelIterator,
An adaptor that flattens parallel-iterable Item
s into one large iterator. Read more
pub fn flatten_iter(self) -> FlattenIter<Self> where
Self::Item: IntoIterator,
<Self::Item as IntoIterator>::Item: Send,
[src][−]
Self::Item: IntoIterator,
<Self::Item as IntoIterator>::Item: Send,
An adaptor that flattens serial-iterable Item
s into one large iterator. Read more
pub fn reduce<OP, ID>(self, identity: ID, op: OP) -> Self::Item where
ID: Fn() -> Self::Item + Sync + Send,
OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,
[src][−]
ID: Fn() -> Self::Item + Sync + Send,
OP: Fn(Self::Item, Self::Item) -> 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 more
pub fn reduce_with<OP>(self, op: OP) -> Option<Self::Item> where
OP: Fn(Self::Item, Self::Item) -> Self::Item + Sync + Send,
[src][−]
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 more
pub fn try_reduce<T, OP, ID>(self, identity: ID, op: OP) -> Self::Item where
ID: Fn() -> T + Sync + Send,
OP: Fn(T, T) -> Self::Item + Sync + Send,
Self::Item: Try,
<Self::Item as Try>::Ok == T,
[src][−]
ID: Fn() -> T + Sync + Send,
OP: Fn(T, T) -> Self::Item + Sync + Send,
Self::Item: Try,
<Self::Item as Try>::Ok == T,
Reduces the items in the iterator into one item using a fallible op
.
The identity
argument is used the same way as in reduce()
. Read more
pub fn try_reduce_with<T, OP>(self, op: OP) -> Option<Self::Item> where
OP: Fn(T, T) -> Self::Item + Sync + Send,
Self::Item: Try,
<Self::Item as Try>::Ok == T,
[src][−]
OP: Fn(T, T) -> Self::Item + Sync + Send,
Self::Item: Try,
<Self::Item as Try>::Ok == T,
Reduces the items in the iterator into one item using a fallible op
. Read more
pub fn fold<T, ID, F>(self, identity: ID, fold_op: F) -> Fold<Self, ID, F> where
F: Fn(T, Self::Item) -> T + Sync + Send,
T: Send,
ID: Fn() -> T + Sync + Send,
[src][−]
F: Fn(T, Self::Item) -> T + Sync + Send,
T: Send,
ID: Fn() -> T + Sync + 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 more
pub 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,
[src][−]
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 more
pub 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,
R: Try<Ok = T> + Send,
ID: Fn() -> T + Sync + Send,
[src][−]
self,
identity: ID,
fold_op: F
) -> TryFold<Self, R, ID, F> where
F: Fn(T, Self::Item) -> R + Sync + Send,
R: Try<Ok = T> + Send,
ID: Fn() -> T + Sync + Send,
Performs a fallible parallel fold. Read more
pub 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<Ok = T> + Send,
T: Clone + Send,
[src][−]
self,
init: T,
fold_op: F
) -> TryFoldWith<Self, R, F> where
F: Fn(T, Self::Item) -> R + Sync + Send,
R: Try<Ok = T> + Send,
T: Clone + Send,
Performs a fallible parallel fold with a cloneable init
value. Read more
pub fn sum<S>(self) -> S where
S: Send + Sum<Self::Item> + Sum<S>,
[src][−]
S: Send + Sum<Self::Item> + Sum<S>,
Sums up the items in the iterator. Read more
pub fn product<P>(self) -> P where
P: Send + Product<Self::Item> + Product<P>,
[src][−]
P: Send + Product<Self::Item> + Product<P>,
Multiplies all the items in the iterator. Read more
pub fn min(self) -> Option<Self::Item> where
Self::Item: Ord,
[src][−]
Self::Item: Ord,
Computes the minimum of all the items in the iterator. If the
iterator is empty, None
is returned; otherwise, Some(min)
is returned. Read more
pub fn min_by<F>(self, f: F) -> Option<Self::Item> where
F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,
[src][−]
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 more
pub fn min_by_key<K, F>(self, f: F) -> Option<Self::Item> where
K: Ord + Send,
F: Sync + Send + Fn(&Self::Item) -> K,
[src][−]
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 more
pub fn max(self) -> Option<Self::Item> where
Self::Item: Ord,
[src][−]
Self::Item: Ord,
Computes the maximum of all the items in the iterator. If the
iterator is empty, None
is returned; otherwise, Some(max)
is returned. Read more
pub fn max_by<F>(self, f: F) -> Option<Self::Item> where
F: Sync + Send + Fn(&Self::Item, &Self::Item) -> Ordering,
[src][−]
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(min)
is returned. Read more
pub fn max_by_key<K, F>(self, f: F) -> Option<Self::Item> where
K: Ord + Send,
F: Sync + Send + Fn(&Self::Item) -> K,
[src][−]
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 more
pub fn chain<C>(
self,
chain: C
) -> Chain<Self, <C as IntoParallelIterator>::Iter> where
C: IntoParallelIterator<Item = Self::Item>,
[src][−]
self,
chain: C
) -> Chain<Self, <C as IntoParallelIterator>::Iter> where
C: IntoParallelIterator<Item = Self::Item>,
Takes two iterators and creates a new iterator over both. Read more
pub fn find_any<P>(self, predicate: P) -> Option<Self::Item> where
P: Fn(&Self::Item) -> bool + Sync + Send,
[src][−]
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 more
pub fn find_first<P>(self, predicate: P) -> Option<Self::Item> where
P: Fn(&Self::Item) -> bool + Sync + Send,
[src][−]
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
pub fn find_last<P>(self, predicate: P) -> Option<Self::Item> where
P: Fn(&Self::Item) -> bool + Sync + Send,
[src][−]
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
pub fn find_map_any<P, R>(self, predicate: P) -> Option<R> where
R: Send,
P: Fn(Self::Item) -> Option<R> + Sync + Send,
[src][−]
R: Send,
P: Fn(Self::Item) -> Option<R> + Sync + Send,
Applies the given predicate to the items in the parallel iterator and returns any non-None result of the map operation. Read more
pub fn find_map_first<P, R>(self, predicate: P) -> Option<R> where
R: Send,
P: Fn(Self::Item) -> Option<R> + Sync + Send,
[src][−]
R: Send,
P: Fn(Self::Item) -> Option<R> + Sync + 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
pub fn find_map_last<P, R>(self, predicate: P) -> Option<R> where
R: Send,
P: Fn(Self::Item) -> Option<R> + Sync + Send,
[src][−]
R: Send,
P: Fn(Self::Item) -> Option<R> + Sync + 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
pub fn any<P>(self, predicate: P) -> bool where
P: Fn(Self::Item) -> bool + Sync + Send,
[src][−]
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
pub fn all<P>(self, predicate: P) -> bool where
P: Fn(Self::Item) -> bool + Sync + Send,
[src][−]
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
pub fn while_some<T>(self) -> WhileSome<Self> where
Self: ParallelIterator<Item = Option<T>>,
T: Send,
[src][−]
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 more
pub fn panic_fuse(self) -> PanicFuse<Self>
[src][−]
Wraps an iterator with a fuse in case of panics, to halt all threads as soon as possible. Read more
pub fn collect<C>(self) -> C where
C: FromParallelIterator<Self::Item>,
[src][−]
C: FromParallelIterator<Self::Item>,
Creates a fresh collection containing all the elements produced by this parallel iterator. Read more
pub fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB) where
Self: ParallelIterator<Item = (A, B)>,
A: Send,
B: Send,
FromB: Default + Send + ParallelExtend<B>,
FromA: Default + Send + ParallelExtend<A>,
[src][−]
Self: ParallelIterator<Item = (A, B)>,
A: Send,
B: Send,
FromB: Default + Send + ParallelExtend<B>,
FromA: Default + Send + ParallelExtend<A>,
Unzips the items of a parallel iterator into a pair of arbitrary
ParallelExtend
containers. Read more
pub 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,
[src][−]
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 more
pub fn partition_map<A, B, P, L, R>(self, predicate: P) -> (A, B) where
A: Default + Send + ParallelExtend<L>,
B: Default + Send + ParallelExtend<R>,
R: Send,
L: Send,
P: Fn(Self::Item) -> Either<L, R> + Sync + Send,
[src][−]
A: Default + Send + ParallelExtend<L>,
B: Default + Send + ParallelExtend<R>,
R: Send,
L: Send,
P: Fn(Self::Item) -> Either<L, R> + Sync + 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 more
pub fn intersperse(self, element: Self::Item) -> Intersperse<Self> where
Self::Item: Clone,
[src][−]
Self::Item: Clone,
Intersperses clones of an element between items of this iterator. Read more
Auto Trait Implementations
impl<'a, K, V> RefUnwindSafe for ParValuesMut<'a, K, V> where
K: RefUnwindSafe,
V: RefUnwindSafe,
K: RefUnwindSafe,
V: RefUnwindSafe,
impl<'a, K, V> Send for ParValuesMut<'a, K, V> where
K: Send,
V: Send,
K: Send,
V: Send,
impl<'a, K, V> Sync for ParValuesMut<'a, K, V> where
K: Sync,
V: Sync,
K: Sync,
V: Sync,
impl<'a, K, V> Unpin for ParValuesMut<'a, K, V>
impl<'a, K, V> !UnwindSafe for ParValuesMut<'a, K, V>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src][+]
T: 'static + ?Sized,
pub fn type_id(&self) -> TypeId
[src][−]
Gets the TypeId
of self
. Read more
impl<T> Borrow<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
pub fn borrow(&self) -> &T
[src][−]
Immutably borrows from an owned value. Read more
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src][−]
Mutably borrows from an owned value. Read more
impl<T> From<T> for T
[src][+]
impl<T, U> Into<U> for T where
U: From<T>,
[src][+]
U: From<T>,
impl<T> IntoParallelIterator for T where
T: ParallelIterator,
[src][+]
T: ParallelIterator,
type Iter = T
The parallel iterator type that will be created.
type Item = <T as ParallelIterator>::Item
The type of item that the parallel iterator will produce.
pub fn into_par_iter(self) -> T
[src][−]
Converts self
into a parallel iterator. Read more
impl<T> Pointable for T
[src][+]
pub const ALIGN: usize
[src][−][−]
The alignment of pointer.
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
[src][−]
Initializes a with the given initializer. Read more
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
[src][−]
Dereferences the given pointer. Read more
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
[src][−]
Mutably dereferences the given pointer. Read more
pub unsafe fn drop(ptr: usize)
[src][−]
Drops the object pointed to by the given pointer. Read more
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src][+]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src][−]
Performs the conversion.
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src][+]
U: TryFrom<T>,