FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    IFerroReadOnlyList

    trait · ferroui-base · v0.5.0

    trait IFerroReadOnlyList<T>: INotifyCollectionChanged + INotifyPropertyChanged
    

    A read-only notifying list.

    The members of the read-only list contract it extends (count, indexer, enumeration) are part of the trait, together with the typed form of the collection changed event, which carries the items; INotifyCollectionChanged is its untyped form.

    View source

    Members

    count

    fn count(self: &Self) -> usize
    

    The number of items in the list.

    Source

    get

    fn get(self: &Self, index: usize) -> T
    

    The item at index. Panics if out of range.

    Source

    snapshot

    fn snapshot(self: &Self) -> Rc<Vec<T>>
    

    The items, as a snapshot that stays unchanged if the list is modified (enumeration).

    Source

    add_collection_changed

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

    Subscribes to changes. 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.