KeyValueComparer
struct · ferroui-dynamic-data · v0.5.0
struct KeyValueComparer<T, K>
Compares the pairs of a key and an item of a sorted cache (KeyValueComparer<TObject, TKey>):
by the items with the comparer when there is one, then by the keys, so that each pair has a
unique position.
Members
new
fn new(comparer: Option<Rc<dyn Fn(&T, &T) -> Ordering>>) -> Self
A comparer of pairs by comparer, then by the keys (KeyValueComparer(IComparer<TObject>?)).
item_comparer
fn item_comparer(self: &Self) -> Option<&Rc<dyn Fn(&T, &T) -> Ordering>>
The comparer of the items.
compare
fn compare(self: &Self, x: &(K, T), y: &(K, T)) -> Ordering
Compares two pairs (Compare).
to_fn
fn to_fn(self: &Self) -> Rc<dyn Fn(&(K, T), &(K, T)) -> Ordering>
The comparer as a function.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeBorrow<T>BorrowMut<T>CloneToUninitInto<U>From<T>TryInto<U>TryFrom<U>AnyToOwnedCloneDefaultDebug
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.