pub trait IObservableCollection<T: Clone + PartialEq + 'static>:
INotifyCollectionChanged
+ INotifyPropertyChanged
+ INotifyCollectionChangedSuspender {
Show 14 methods
// Required methods
fn count(&self) -> usize;
fn get(&self, index: usize) -> T;
fn set(&self, index: usize, item: T);
fn insert(&self, index: usize, item: T);
fn remove_at(&self, index: usize);
fn clear(&self);
fn to_vec(&self) -> Vec<T>;
fn load(&self, items: Vec<T>);
fn move_item(&self, old_index: usize, new_index: usize);
// Provided methods
fn add(&self, item: T) { ... }
fn index_of(&self, item: &T) -> Option<usize> { ... }
fn contains(&self, item: &T) -> bool { ... }
fn remove(&self, item: &T) -> bool { ... }
fn clone_changes(&self, changes: &ChangeSet<T>) { ... }
}Expand description
The collection that the binding operators fill (IObservableCollection<T>): a list that
notifies its changes and can hold its notifications back.
Deviation (DEVIATIONS.md, DynamicData): the collection is a shared handle, as the object of
.NET is a reference, so its methods take &self; the members of IList<T> that the binding
uses are part of the trait.
Required Methods§
Provided Methods§
Sourcefn clone_changes(&self, changes: &ChangeSet<T>)
fn clone_changes(&self, changes: &ChangeSet<T>)
Applies the changes of a list (ListEx.Clone(IList<T>, IChangeSet<T>)): the general form,
which moves items with move_item as upstream does for an
ObservableCollection<T>.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".