pub struct ObservableList<T> { /* private fields */ }Expand description
A read-only list of the items of a sequence of change sets (AnonymousObservableList<T>, the
result of AsObservableList).
Implementations§
Source§impl<T: Clone + PartialEq + 'static> ObservableList<T>
impl<T: Clone + PartialEq + 'static> ObservableList<T>
Sourcepub fn from_source<C: IChangeSet<T>>(source: Rc<dyn IObservable<C>>) -> Self
pub fn from_source<C: IChangeSet<T>>(source: Rc<dyn IObservable<C>>) -> Self
The list of the items of source (AnonymousObservableList(IObservable<IChangeSet<T>>)).
Sourcepub fn from_list(list: &SourceList<T>) -> Self
pub fn from_list(list: &SourceList<T>) -> Self
A read-only view of list (AnonymousObservableList(ISourceList<T>)).
Trait Implementations§
Source§impl<S: CacheChangeSetSource + Clone + PartialEq> CacheSourceListCombineEx for ObservableList<S>
impl<S: CacheChangeSetSource + Clone + PartialEq> CacheSourceListCombineEx for ObservableList<S>
Source§type Item = <S as CacheChangeSetSource>::Item
type Item = <S as CacheChangeSetSource>::Item
The type of the items.
Source§type Key = <S as CacheChangeSetSource>::Key
type Key = <S as CacheChangeSetSource>::Key
The type of the keys.
Source§fn and_cache(&self) -> Rc<dyn IObservable<ChangeSet<S::Item, S::Key>>>
fn and_cache(&self) -> Rc<dyn IObservable<ChangeSet<S::Item, S::Key>>>
The items that are in every source of the list; none while the list is empty
(
And(IObservableList<..>)).Source§fn or(&self) -> Rc<dyn IObservable<ChangeSet<S::Item, S::Key>>>
fn or(&self) -> Rc<dyn IObservable<ChangeSet<S::Item, S::Key>>>
The items that are in any source of the list (
Or(IObservableList<..>)).Source§impl<T> Clone for ObservableList<T>
impl<T> Clone for ObservableList<T>
Source§impl<T: Clone + PartialEq + 'static> IDisposable for ObservableList<T>
impl<T: Clone + PartialEq + 'static> IDisposable for ObservableList<T>
Source§impl<T: Clone + PartialEq + 'static> IObservableList<T> for ObservableList<T>
impl<T: Clone + PartialEq + 'static> IObservableList<T> for ObservableList<T>
Source§fn count_changed(&self) -> Rc<dyn IObservable<usize>>
fn count_changed(&self) -> Rc<dyn IObservable<usize>>
The number of items, now and whenever it changes (
CountChanged).Source§fn connect_with(
&self,
predicate: Option<Rc<dyn Fn(&T) -> bool>>,
) -> Rc<dyn IObservable<ChangeSet<T>>>
fn connect_with( &self, predicate: Option<Rc<dyn Fn(&T) -> bool>>, ) -> Rc<dyn IObservable<ChangeSet<T>>>
The items as one range added, then the changes, of the items that
predicate accepts
(Connect).Source§fn preview_with(
&self,
predicate: Option<Rc<dyn Fn(&T) -> bool>>,
) -> Rc<dyn IObservable<ChangeSet<T>>>
fn preview_with( &self, predicate: Option<Rc<dyn Fn(&T) -> bool>>, ) -> Rc<dyn IObservable<ChangeSet<T>>>
The changes before they are applied (
Preview).Source§impl<T: Clone + PartialEq + 'static> ListChangeSetSource for ObservableList<T>
impl<T: Clone + PartialEq + 'static> ListChangeSetSource for ObservableList<T>
Source§fn source_change_sets(&self) -> Rc<dyn IObservable<ChangeSet<T>>>
fn source_change_sets(&self) -> Rc<dyn IObservable<ChangeSet<T>>>
The change sets of the source: the sequence itself, or
Connect() of a list.Source§impl<S: ListChangeSetSource + Clone + PartialEq> ListSourceListCombineEx for ObservableList<S>
impl<S: ListChangeSetSource + Clone + PartialEq> ListSourceListCombineEx for ObservableList<S>
Source§type Item = <S as ListChangeSetSource>::Item
type Item = <S as ListChangeSetSource>::Item
The type of the items.
Source§fn and_list(&self) -> Rc<dyn IObservable<ChangeSet<S::Item>>>
fn and_list(&self) -> Rc<dyn IObservable<ChangeSet<S::Item>>>
The items that are in every source of the list; none while the list is empty
(
And(IObservableList<..>)).Source§fn or(&self) -> Rc<dyn IObservable<ChangeSet<S::Item>>>
fn or(&self) -> Rc<dyn IObservable<ChangeSet<S::Item>>>
The items that are in any source of the list (
Or(IObservableList<..>)).Auto Trait Implementations§
impl<T> !RefUnwindSafe for ObservableList<T>
impl<T> !Send for ObservableList<T>
impl<T> !Sync for ObservableList<T>
impl<T> !UnwindSafe for ObservableList<T>
impl<T> Freeze for ObservableList<T>where
SourceList<T>: Freeze,
impl<T> Unpin for ObservableList<T>where
SourceList<T>: Unpin,
impl<T> UnsafeUnpin for ObservableList<T>where
SourceList<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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T, L> SourceListEx<T> for L
impl<T, L> SourceListEx<T> for L
Source§fn cast_list<U: Clone + 'static>(
&self,
conversion_factory: impl Fn(&T) -> U + 'static,
) -> Rc<dyn IObservable<ChangeSet<U>>>where
Self: ISourceList<T>,
fn cast_list<U: Clone + 'static>(
&self,
conversion_factory: impl Fn(&T) -> U + 'static,
) -> Rc<dyn IObservable<ChangeSet<U>>>where
Self: ISourceList<T>,
The items and their changes, each item converted by
conversion_factory
(Cast(ISourceList<TSource>, Func<TSource, TDestination>)).Source§fn defer_until_loaded(&self) -> Rc<dyn IObservable<ChangeSet<T>>>
fn defer_until_loaded(&self) -> Rc<dyn IObservable<ChangeSet<T>>>
The items and their changes from the first change set (
DeferUntilLoaded(IObservableList)).Source§fn expire_after(
&self,
time_selector: impl Fn(&T) -> Option<Duration> + 'static,
) -> Rc<dyn IObservable<Vec<T>>>
fn expire_after( &self, time_selector: impl Fn(&T) -> Option<Duration> + 'static, ) -> Rc<dyn IObservable<Vec<T>>>
Removes each item from the list once the time that
time_selector gives for it has
passed (None: never), timed on the default scheduler; the removed items
(ExpireAfter(ISourceList, Func<T, TimeSpan?>, TimeSpan? = null, IScheduler? = null)).Source§fn expire_after_on(
&self,
time_selector: impl Fn(&T) -> Option<Duration> + 'static,
scheduler: Rc<dyn IScheduler>,
) -> Rc<dyn IObservable<Vec<T>>>
fn expire_after_on( &self, time_selector: impl Fn(&T) -> Option<Duration> + 'static, scheduler: Rc<dyn IScheduler>, ) -> Rc<dyn IObservable<Vec<T>>>
expire_after on scheduler.Source§fn expire_after_with_polling(
&self,
time_selector: impl Fn(&T) -> Option<Duration> + 'static,
polling_interval: Option<Duration>,
) -> Rc<dyn IObservable<Vec<T>>>
fn expire_after_with_polling( &self, time_selector: impl Fn(&T) -> Option<Duration> + 'static, polling_interval: Option<Duration>, ) -> Rc<dyn IObservable<Vec<T>>>
expire_after that removes the expired items every
polling_interval rather than at their times.Source§fn expire_after_with_polling_on(
&self,
time_selector: impl Fn(&T) -> Option<Duration> + 'static,
polling_interval: Option<Duration>,
scheduler: Rc<dyn IScheduler>,
) -> Rc<dyn IObservable<Vec<T>>>
fn expire_after_with_polling_on( &self, time_selector: impl Fn(&T) -> Option<Duration> + 'static, polling_interval: Option<Duration>, scheduler: Rc<dyn IScheduler>, ) -> Rc<dyn IObservable<Vec<T>>>
expire_after_with_polling on scheduler.Source§fn limit_size_to(&self, size_limit: usize) -> Rc<dyn IObservable<Vec<T>>>
fn limit_size_to(&self, size_limit: usize) -> Rc<dyn IObservable<Vec<T>>>
Removes the oldest items of the list beyond
size_limit, on the default scheduler; the
removed items (LimitSizeTo(ISourceList, int, IScheduler? = null)). Read moreSource§fn limit_size_to_on(
&self,
size_limit: usize,
scheduler: Rc<dyn IScheduler>,
) -> Rc<dyn IObservable<Vec<T>>>
fn limit_size_to_on( &self, size_limit: usize, scheduler: Rc<dyn IScheduler>, ) -> Rc<dyn IObservable<Vec<T>>>
limit_size_to on scheduler.