pub struct Then<C, D>(/* private fields */);
Expand description
A comparator that [lexicographically] (https://en.wikipedia.org/wiki/Lexicographical_order) combines two others.
See Compare::then
for an example.
Trait Implementations§
Source§impl<C, D, L: ?Sized, R: ?Sized> Compare<L, R> for Then<C, D>
impl<C, D, L: ?Sized, R: ?Sized> Compare<L, R> for Then<C, D>
Source§fn compare(&self, l: &L, r: &R) -> Ordering
fn compare(&self, l: &L, r: &R) -> Ordering
Compares two values, returning
Less
, Equal
, or Greater
if l
is less
than, equal to, or greater than r
, respectively.Source§fn borrowing(self) -> Borrowing<Self, L, R>where
Self: Sized,
fn borrowing(self) -> Borrowing<Self, L, R>where
Self: Sized,
Borrows the comparator’s parameters before comparing them. Read more
Source§fn rev(self) -> Rev<Self>where
Self: Sized,
fn rev(self) -> Rev<Self>where
Self: Sized,
Reverses the ordering of the comparator. Read more
impl<C: Copy, D: Copy> Copy for Then<C, D>
impl<C: Eq, D: Eq> Eq for Then<C, D>
impl<C, D> StructuralPartialEq for Then<C, D>
Auto Trait Implementations§
impl<C, D> Freeze for Then<C, D>
impl<C, D> RefUnwindSafe for Then<C, D>where
C: RefUnwindSafe,
D: RefUnwindSafe,
impl<C, D> Send for Then<C, D>
impl<C, D> Sync for Then<C, D>
impl<C, D> Unpin for Then<C, D>
impl<C, D> UnwindSafe for Then<C, D>where
C: UnwindSafe,
D: 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