pub struct ExpectOrd<T> { /* private fields */ }Expand description
Implements a total order for a partial order by panicking whenever elements cannot be compared.
Note that ExpectOrd::partial_cmp will panic rather than return None.
This is to ensure consistency between the PartialOrd methods
and the Ord methods, as required by Ord.
Implementations§
Trait Implementations§
Source§impl<T: PartialOrd> Ord for ExpectOrd<T>
impl<T: PartialOrd> Ord for ExpectOrd<T>
Source§impl<T: PartialOrd> PartialEq for ExpectOrd<T>
impl<T: PartialOrd> PartialEq for ExpectOrd<T>
Source§impl<T: PartialOrd> PartialOrd for ExpectOrd<T>
impl<T: PartialOrd> PartialOrd for ExpectOrd<T>
impl<T: Copy> Copy for ExpectOrd<T>
impl<T: PartialOrd> Eq for ExpectOrd<T>
Auto Trait Implementations§
impl<T> Freeze for ExpectOrd<T>where
T: Freeze,
impl<T> RefUnwindSafe for ExpectOrd<T>where
T: RefUnwindSafe,
impl<T> Send for ExpectOrd<T>where
T: Send,
impl<T> Sync for ExpectOrd<T>where
T: Sync,
impl<T> Unpin for ExpectOrd<T>where
T: Unpin,
impl<T> UnwindSafe for ExpectOrd<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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more