ReadOnlyObservableCollection
struct · ferroui-dynamic-data · v0.5.0
struct ReadOnlyObservableCollection<T>
A read-only view of an observable collection (ReadOnlyObservableCollection<T>).
Members
newadd_collection_changedremove_collection_changedcountis_emptygetitemsto_veccontainsindex_of
new
fn new(collection: ObservableCollection<T>) -> Self
The view of collection (ReadOnlyObservableCollection(ObservableCollection<T>)).
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 +=).
remove_collection_changed
fn remove_collection_changed(self: &Self, token: u64) -> bool
Removes a handler (CollectionChanged -=).
count
fn count(self: &Self) -> usize
The number of items (Count).
is_empty
fn is_empty(self: &Self) -> bool
get
fn get(self: &Self, index: usize) -> T
The item at index (the indexer).
items
fn items(self: &Self) -> Ref<'_, Vec<T>>
The items, borrowed.
to_vec
fn to_vec(self: &Self) -> Vec<T>
A copy of the items.
contains
fn contains(self: &Self, item: &T) -> bool
Whether the collection has item (Contains).
index_of
fn index_of(self: &Self, item: &T) -> Option<usize>
The index of item (IndexOf).
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeBorrow<T>BorrowMut<T>CloneToUninitInto<U>From<T>TryInto<U>TryFrom<U>AnyToOwnedObservableCollectionEx<T>ClonePartialEqDebugFrom<ObservableCollection<T>>From<&ObservableCollectionExtended<T>>INotifyCollectionChangedINotifyPropertyChanged
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.