pub struct Rev<C>(/* private fields */);
Expand description
A comparator that reverses the ordering of another.
See Compare::rev
for an example.
Trait Implementations§
Source§impl<C, L: ?Sized, R: ?Sized> Compare<L, R> for Rev<C>where
C: Compare<L, R>,
impl<C, L: ?Sized, R: ?Sized> Compare<L, R> for Rev<C>where
C: Compare<L, R>,
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> Copy for Rev<C>
impl<C: Eq> Eq for Rev<C>
impl<C> StructuralPartialEq for Rev<C>
Auto Trait Implementations§
impl<C> Freeze for Rev<C>where
C: Freeze,
impl<C> RefUnwindSafe for Rev<C>where
C: RefUnwindSafe,
impl<C> Send for Rev<C>where
C: Send,
impl<C> Sync for Rev<C>where
C: Sync,
impl<C> Unpin for Rev<C>where
C: Unpin,
impl<C> UnwindSafe for Rev<C>where
C: 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