Struct comparator::combinators::ThenComparingByKey
source · [−]pub struct ThenComparingByKey<T, F> { /* private fields */ }
Expand description
A comparator that chains comparison function.
Trait Implementations
impl<T, F, U, W> Comparator<U> for ThenComparingByKey<T, F> where
T: Comparator<U>,
F: Fn(&U) -> W,
U: ?Sized,
W: Ord,
impl<T, F, U, W> Comparator<U> for ThenComparingByKey<T, F> where
T: Comparator<U>,
F: Fn(&U) -> W,
U: ?Sized,
W: Ord,
fn 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
fn 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
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
Mutably borrows from an owned value. Read more