FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    IFerroReadOnlyDictionary

    trait · ferroui-base · v0.5.0

    trait IFerroReadOnlyDictionary<K, V>: INotifyCollectionChanged + INotifyPropertyChanged
    

    A read-only notifying dictionary.

    The members of the read-only dictionary contract it extends are part of the trait, together with the typed form of the collection changed event, which carries the entries; INotifyCollectionChanged is its untyped form.

    View source

    Members

    count

    fn count(self: &Self) -> usize
    

    The number of entries.

    Source

    get

    fn get(self: &Self, key: &K) -> V
    

    The value for key. Panics if the key is not present.

    Source

    try_get_value

    fn try_get_value(self: &Self, key: &K) -> Option<V>
    

    The value for key, if present.

    Source

    contains_key

    fn contains_key(self: &Self, key: &K) -> bool
    

    Source

    keys

    fn keys(self: &Self) -> Vec<K>
    

    The keys, in enumeration order.

    Source

    values

    fn values(self: &Self) -> Vec<V>
    

    The values, in enumeration order.

    Source

    to_vec

    fn to_vec(self: &Self) -> Vec<(K, V)>
    

    The entries, in enumeration order (enumeration).

    Source

    add_collection_changed

    fn add_collection_changed(self: &Self, handler: Rc<CollectionChangedHandler<(K, V)>>) -> u64
    

    Subscribes to changes of the collection. Returns a token for remove_collection_changed.

    Source

    remove_collection_changed

    fn remove_collection_changed(self: &Self, token: u64) -> bool
    

    Unsubscribes a handler.

    Source

    Trait implementations

    Availability

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