pub enum OutOfOrder<T: Debug> {
Duplicate {
current: T,
last: T,
},
NoDefinedComparison {
current: T,
last: T,
},
Swapped {
current: T,
last: T,
},
}Expand description
Some elements in a supposedly sorted iterator were not sorted.
Variants§
Duplicate
Two adjacent elements compared as equal (iff this was explicitly disallowed).
Fields
§
current: TElement that compared equal to the one before it.
§
last: TElement that compared equal to the one after it.
NoDefinedComparison
Two adjacent elements could not be compared.
Fields
§
current: TElement that did not compared to the one before it.
§
last: TElement that did not compared to the one after it.
Swapped
Two adjacent elements compared in decreasing order.
Trait Implementations§
Source§impl<T: Clone + Debug> Clone for OutOfOrder<T>
impl<T: Clone + Debug> Clone for OutOfOrder<T>
Source§fn clone(&self) -> OutOfOrder<T>
fn clone(&self) -> OutOfOrder<T>
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<T: Debug> Display for OutOfOrder<T>
impl<T: Debug> Display for OutOfOrder<T>
Source§impl<T: Ord + Debug> Ord for OutOfOrder<T>
impl<T: Ord + Debug> Ord for OutOfOrder<T>
Source§fn cmp(&self, other: &OutOfOrder<T>) -> Ordering
fn cmp(&self, other: &OutOfOrder<T>) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<T: PartialOrd + Debug> PartialOrd for OutOfOrder<T>
impl<T: PartialOrd + Debug> PartialOrd for OutOfOrder<T>
impl<T: Copy + Debug> Copy for OutOfOrder<T>
impl<T: Eq + Debug> Eq for OutOfOrder<T>
impl<T: Debug> StructuralPartialEq for OutOfOrder<T>
Auto Trait Implementations§
impl<T> Freeze for OutOfOrder<T>where
T: Freeze,
impl<T> RefUnwindSafe for OutOfOrder<T>where
T: RefUnwindSafe,
impl<T> Send for OutOfOrder<T>where
T: Send,
impl<T> Sync for OutOfOrder<T>where
T: Sync,
impl<T> Unpin for OutOfOrder<T>where
T: Unpin,
impl<T> UnwindSafe for OutOfOrder<T>where
T: UnwindSafe,
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