ComparerChainingExtensions
trait · ferroui-reactiveui · v0.5.0
trait ComparerChainingExtensions<T>
Chains a comparison onto a parent comparer (ComparerChainingExtensions): the result sorts by
the parent first, then, where the parent finds two elements equal, by the values of a selector.
It is implemented for a comparer and for an optional one (upstream's parent may be null, which sorts by the selector alone).
Members
then_by
fn then_by<V: Ord + 'static>(self: &Self, selector: impl Fn(&T) -> V + 'static) -> Comparer<T>
Then in ascending order of the values of selector, compared by their Ord
(ThenBy<TValue>(Func<T, TValue>)).
then_by_with
fn then_by_with<V: 'static>(self: &Self, selector: impl Fn(&T) -> V + 'static, comparer: Comparer<V>) -> Comparer<T>
Then in ascending order of the values of selector, compared by comparer
(ThenBy<TValue>(Func<T, TValue>, IComparer<TValue>)).
then_by_descending
fn then_by_descending<V: Ord + 'static>(self: &Self, selector: impl Fn(&T) -> V + 'static) -> Comparer<T>
Then in descending order of the values of selector, compared by their Ord
(ThenByDescending<TValue>(Func<T, TValue>)).
then_by_descending_with
fn then_by_descending_with<V: 'static>(self: &Self, selector: impl Fn(&T) -> V + 'static, comparer: Comparer<V>) -> Comparer<T>
Then in descending order of the values of selector, compared by comparer
(ThenByDescending<TValue>(Func<T, TValue>, IComparer<TValue>)).
Trait implementations
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.