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