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.
Members
count
fn count(self: &Self) -> usize
The number of items in the list.
get
fn get(self: &Self, index: usize) -> T
The item at index. Panics if out of range.
snapshot
fn snapshot(self: &Self) -> Rc<Vec<T>>
The items, as a snapshot that stays unchanged if the list is modified (enumeration).
add_collection_changed
fn add_collection_changed(self: &Self, handler: Rc<CollectionChangedHandler<T>>) -> u64
Subscribes to changes. Returns a token for
remove_collection_changed.
remove_collection_changed
fn remove_collection_changed(self: &Self, token: u64) -> bool
Unsubscribes a handler.
Trait implementations
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.