FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    ReadOnlyObservableCollection

    struct · ferroui-dynamic-data · v0.5.0

    struct ReadOnlyObservableCollection<T>
    

    A read-only view of an observable collection (ReadOnlyObservableCollection<T>).

    View source

    Members

    new

    fn new(collection: ObservableCollection<T>) -> Self
    

    The view of collection (ReadOnlyObservableCollection(ObservableCollection<T>)).

    Source

    add_collection_changed

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

    Adds a handler of the typed change notifications; returns the token that removes it (CollectionChanged +=).

    Source

    remove_collection_changed

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

    Removes a handler (CollectionChanged -=).

    Source

    count

    fn count(self: &Self) -> usize
    

    The number of items (Count).

    Source

    is_empty

    fn is_empty(self: &Self) -> bool
    

    Source

    get

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

    The item at index (the indexer).

    Source

    items

    fn items(self: &Self) -> Ref<'_, Vec<T>>
    

    The items, borrowed.

    Source

    to_vec

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

    A copy of the items.

    Source

    contains

    fn contains(self: &Self, item: &T) -> bool
    

    Whether the collection has item (Contains).

    Source

    index_of

    fn index_of(self: &Self, item: &T) -> Option<usize>
    

    The index of item (IndexOf).

    Source

    Trait implementations

    Availability

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