pub struct ReadOnlyObservableCollection<T> { /* private fields */ }Expand description
A read-only view of an observable collection (ReadOnlyObservableCollection<T>).
Implementations§
Source§impl<T: Clone + PartialEq + 'static> ReadOnlyObservableCollection<T>
impl<T: Clone + PartialEq + 'static> ReadOnlyObservableCollection<T>
Sourcepub fn new(collection: ObservableCollection<T>) -> Self
pub fn new(collection: ObservableCollection<T>) -> Self
The view of collection (ReadOnlyObservableCollection(ObservableCollection<T>)).
Sourcepub fn add_collection_changed(
&self,
handler: Rc<CollectionChangedHandler<T>>,
) -> u64
pub fn add_collection_changed( &self, handler: Rc<CollectionChangedHandler<T>>, ) -> u64
Adds a handler of the typed change notifications; returns the token that removes it
(CollectionChanged +=).
Sourcepub fn remove_collection_changed(&self, token: u64) -> bool
pub fn remove_collection_changed(&self, token: u64) -> bool
Removes a handler (CollectionChanged -=).
pub fn is_empty(&self) -> bool
Trait Implementations§
Source§impl<T> Clone for ReadOnlyObservableCollection<T>
impl<T> Clone for ReadOnlyObservableCollection<T>
Source§impl<T: Clone + PartialEq + 'static> From<&ObservableCollectionExtended<T>> for ReadOnlyObservableCollection<T>
impl<T: Clone + PartialEq + 'static> From<&ObservableCollectionExtended<T>> for ReadOnlyObservableCollection<T>
Source§fn from(collection: &ObservableCollectionExtended<T>) -> Self
fn from(collection: &ObservableCollectionExtended<T>) -> Self
The view of the collection (new ReadOnlyObservableCollection<T>(observableCollectionExtended)).
Source§impl<T: Clone + PartialEq + 'static> From<ObservableCollection<T>> for ReadOnlyObservableCollection<T>
impl<T: Clone + PartialEq + 'static> From<ObservableCollection<T>> for ReadOnlyObservableCollection<T>
Source§fn from(collection: ObservableCollection<T>) -> Self
fn from(collection: ObservableCollection<T>) -> Self
Converts to this type from the input type.
Source§impl<T> INotifyCollectionChanged for ReadOnlyObservableCollection<T>
impl<T> INotifyCollectionChanged for ReadOnlyObservableCollection<T>
Source§fn collection_changed(&self) -> &Event<CollectionChange>
fn collection_changed(&self) -> &Event<CollectionChange>
The event raised when the collection changes.
Source§impl<T> INotifyPropertyChanged for ReadOnlyObservableCollection<T>
impl<T> INotifyPropertyChanged for ReadOnlyObservableCollection<T>
Source§fn property_changed(&self) -> &Event<str>
fn property_changed(&self) -> &Event<str>
The event raised when a property value changes.
Source§fn as_notify_property_changing(&self) -> Option<&dyn INotifyPropertyChanging>
fn as_notify_property_changing(&self) -> Option<&dyn INotifyPropertyChanging>
The object as
INotifyPropertyChanging, when it also raises the event of a property
that is about to change; None by default. Read moreSource§impl<T: Clone + PartialEq + 'static> ObservableCollectionEx<T> for ReadOnlyObservableCollection<T>
impl<T: Clone + PartialEq + 'static> ObservableCollectionEx<T> for ReadOnlyObservableCollection<T>
Source§fn notifying_collection(&self) -> ObservableCollection<T>
fn notifying_collection(&self) -> ObservableCollection<T>
The observable collection whose changes are observed.
Source§fn observe_collection_changes(
&self,
) -> Rc<dyn IObservable<CollectionChangedEventPattern<T>>>
fn observe_collection_changes( &self, ) -> Rc<dyn IObservable<CollectionChangedEventPattern<T>>>
The notifications of the changes of the collection (
ObserveCollectionChanges).Source§fn to_observable_change_set(&self) -> Rc<dyn IObservable<ChangeSet<T>>>
fn to_observable_change_set(&self) -> Rc<dyn IObservable<ChangeSet<T>>>
The items of the collection as change sets of a list: its items first, then each of its
changes (
ToObservableChangeSet<T>(), ToObservableChangeSet<TCollection, T>()).Source§fn to_observable_change_set_with_key<K: Eq + Hash + Clone + 'static>(
&self,
key_selector: impl Fn(&T) -> K + 'static,
) -> Rc<dyn IObservable<ChangeSet<T, K>>>
fn to_observable_change_set_with_key<K: Eq + Hash + Clone + 'static>( &self, key_selector: impl Fn(&T) -> K + 'static, ) -> Rc<dyn IObservable<ChangeSet<T, K>>>
to_observable_change_set with each item keyed by
key_selector (ToObservableChangeSet<TObject, TKey>(Func<TObject, TKey>)).Auto Trait Implementations§
impl<T> !RefUnwindSafe for ReadOnlyObservableCollection<T>
impl<T> !Send for ReadOnlyObservableCollection<T>
impl<T> !Sync for ReadOnlyObservableCollection<T>
impl<T> !UnwindSafe for ReadOnlyObservableCollection<T>
impl<T> Freeze for ReadOnlyObservableCollection<T>where
ObservableCollection<T>: Freeze,
impl<T> Unpin for ReadOnlyObservableCollection<T>where
ObservableCollection<T>: Unpin,
impl<T> UnsafeUnpin for ReadOnlyObservableCollection<T>where
ObservableCollection<T>: UnsafeUnpin,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more