Struct comparator::combinators::Reversed
source · pub struct Reversed<T>(_);
Expand description
A comparator that reverse its underlying comparator.
Trait Implementations
sourceimpl<T, U> Comparator<U> for Reversed<T>where
T: Comparator<U>,
impl<T, U> Comparator<U> for Reversed<T>where
T: Comparator<U>,
sourcefn then_comparing<U>(self, other: U) -> ThenComparing<Self, U>where
Self: Sized,
U: Comparator<T>,
fn then_comparing<U>(self, other: U) -> ThenComparing<Self, U>where
Self: Sized,
U: Comparator<T>,
Chains two comparators. Read more
sourcefn then_comparing_by_key<F, U>(self, f: F) -> ThenComparingByKey<Self, F>where
Self: Sized,
F: Fn(&T) -> U,
U: Ord,
fn then_comparing_by_key<F, U>(self, f: F) -> ThenComparingByKey<Self, F>where
Self: Sized,
F: Fn(&T) -> U,
U: Ord,
Chains a comparator with a key function. Read more
impl<T: Copy> Copy for Reversed<T>
Auto Trait Implementations
impl<T> RefUnwindSafe for Reversed<T>where
T: RefUnwindSafe,
impl<T> Send for Reversed<T>where
T: Send,
impl<T> Sync for Reversed<T>where
T: Sync,
impl<T> Unpin for Reversed<T>where
T: Unpin,
impl<T> UnwindSafe for Reversed<T>where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more