FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    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.

    View source

    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>?)).

    Source

    item_comparer

    fn item_comparer(self: &Self) -> Option<&Rc<dyn Fn(&T, &T) -> Ordering>>
    

    The comparer of the items.

    Source

    compare

    fn compare(self: &Self, x: &(K, T), y: &(K, T)) -> Ordering
    

    Compares two pairs (Compare).

    Source

    to_fn

    fn to_fn(self: &Self) -> Rc<dyn Fn(&(K, T), &(K, T)) -> Ordering>
    

    The comparer as a function.

    Source

    Trait implementations

    • Send
    • Sync
    • Freeze
    • UnsafeUnpin
    • Unpin
    • UnwindSafe
    • RefUnwindSafe
    • Borrow<T>
    • BorrowMut<T>
    • CloneToUninit
    • Into<U>
    • From<T>
    • TryInto<U>
    • TryFrom<U>
    • Any
    • ToOwned
    • Clone
    • Default
    • Debug

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.