Struct comparator::combinators::ThenComparingByKey
source · pub struct ThenComparingByKey<T, F> { /* private fields */ }
Expand description
A comparator that chains comparison function.
Trait Implementations
sourceimpl<T: Clone, F: Clone> Clone for ThenComparingByKey<T, F>
impl<T: Clone, F: Clone> Clone for ThenComparingByKey<T, F>
sourcefn clone(&self) -> ThenComparingByKey<T, F>
fn clone(&self) -> ThenComparingByKey<T, F>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl<T, F, U, W> Comparator<U> for ThenComparingByKey<T, F>where
T: Comparator<U>,
F: Fn(&U) -> W,
W: Ord,
impl<T, F, U, W> Comparator<U> for ThenComparingByKey<T, F>where
T: Comparator<U>,
F: Fn(&U) -> W,
W: Ord,
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
sourceimpl<T, F> Debug for ThenComparingByKey<T, F>where
T: Debug,
impl<T, F> Debug for ThenComparingByKey<T, F>where
T: Debug,
impl<T: Copy, F: Copy> Copy for ThenComparingByKey<T, F>
Auto Trait Implementations
impl<T, F> RefUnwindSafe for ThenComparingByKey<T, F>where
F: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, F> Send for ThenComparingByKey<T, F>where
F: Send,
T: Send,
impl<T, F> Sync for ThenComparingByKey<T, F>where
F: Sync,
T: Sync,
impl<T, F> Unpin for ThenComparingByKey<T, F>where
F: Unpin,
T: Unpin,
impl<T, F> UnwindSafe for ThenComparingByKey<T, F>where
F: UnwindSafe,
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