Struct comparator::combinators::Comparing
source · pub struct Comparing<F> { /* private fields */ }
Expand description
A comparator that compares using its key function.
Trait Implementations
sourceimpl<F, T, U> Comparator<T> for Comparing<F>where
F: Fn(&T) -> U,
U: Ord,
impl<F, T, U> Comparator<T> for Comparing<F>where
F: Fn(&T) -> U,
U: 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
impl<F: Copy> Copy for Comparing<F>
Auto Trait Implementations
impl<F> RefUnwindSafe for Comparing<F>where
F: RefUnwindSafe,
impl<F> Send for Comparing<F>where
F: Send,
impl<F> Sync for Comparing<F>where
F: Sync,
impl<F> Unpin for Comparing<F>where
F: Unpin,
impl<F> UnwindSafe for Comparing<F>where
F: 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