pub enum IterationOrder {
Arbitrary,
Ordered,
}
Expand description
Order of parallel iteration, which might be:
- in the order of the input as in regular sequential iterators, or
- arbitrary.
This is important for certain computations:
collect
will return exactly the same result of its sequential counterpart whenOrdered
is used. However, the elements might (but not necessarily) be in arbitrary order whenArbitrary
is used.first
returns the first element of the iterator whenOrdered
, might return any element whenArbitrary
.find
returns the first element satisfying the predicate whenOrdered
, might return any element satisfying the predicate whenArbitrary
(sometimes this method is calledfind_any
).
Variantsยง
Arbitrary
The iteration is allowed to be in arbitrary order when it might improve performance, but not necessarily.
Ordered
Default ordering.
The iteration will be in an order consistent with the input of the collection, and hence, the outputs will always be equivalent to the sequential counterpart.
Trait Implementationsยง
Sourceยงimpl Clone for IterationOrder
impl Clone for IterationOrder
Sourceยงfn clone(&self) -> IterationOrder
fn clone(&self) -> IterationOrder
Returns a copy of the value. Read more
1.0.0 ยท Sourceยงfn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSourceยงimpl Debug for IterationOrder
impl Debug for IterationOrder
Sourceยงimpl Default for IterationOrder
impl Default for IterationOrder
Sourceยงfn default() -> IterationOrder
fn default() -> IterationOrder
Returns the โdefault valueโ for a type. Read more
Sourceยงimpl PartialEq for IterationOrder
impl PartialEq for IterationOrder
impl Copy for IterationOrder
impl Eq for IterationOrder
impl StructuralPartialEq for IterationOrder
Auto Trait Implementationsยง
impl Freeze for IterationOrder
impl RefUnwindSafe for IterationOrder
impl Send for IterationOrder
impl Sync for IterationOrder
impl Unpin for IterationOrder
impl UnwindSafe for IterationOrder
Blanket Implementationsยง
Sourceยงimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Sourceยงfn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more