Struct comparator::combinators::ThenComparing
source · [−]pub struct ThenComparing<T, U>(_, _);
Expand description
A comparator that chains another comparator.
Trait Implementations
impl<T, U, W> Comparator<W> for ThenComparing<T, U> where
T: Comparator<W>,
U: Comparator<W>,
W: ?Sized,
impl<T, U, W> Comparator<W> for ThenComparing<T, U> where
T: Comparator<W>,
U: Comparator<W>,
W: ?Sized,
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, U> RefUnwindSafe for ThenComparing<T, U> where
T: RefUnwindSafe,
U: RefUnwindSafe,
impl<T, U> Send for ThenComparing<T, U> where
T: Send,
U: Send,
impl<T, U> Sync for ThenComparing<T, U> where
T: Sync,
U: Sync,
impl<T, U> Unpin for ThenComparing<T, U> where
T: Unpin,
U: Unpin,
impl<T, U> UnwindSafe for ThenComparing<T, U> where
T: UnwindSafe,
U: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more