SortedObservableCacheEx
trait · ferroui-dynamic-data · v0.5.0
trait SortedObservableCacheEx<T: Clone + 'static, K: Eq + Hash + Clone + 'static, C: ISortedChangeSet<T, K>>
The operators of sorted change sets (ObservableCacheEx over ISortedChangeSet), for every
sequence of sorted, paged or virtual change sets C.
Members
sorted_source
fn sorted_source(self: &Self) -> Rc<dyn IObservable<C>>
The sequence itself.
sorted_change_sets
fn sorted_change_sets(self: &Self) -> Rc<dyn IObservable<SortedChangeSet<T, K>>>
The sequence as plain sorted change sets (the upcast of a paged or virtual change set to
ISortedChangeSet<TObject, TKey>).
treat_moves_as_remove_add
fn treat_moves_as_remove_add(self: &Self) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::cache::SortedChangeSet<T, K>>>
The sorted change sets with each move replaced by a removal at the previous index and an
addition at the current one (TreatMovesAsRemoveAdd).
update_index
fn update_index(self: &Self) -> std::rc::Rc<dyn ferroui_system::IObservable<C>>
where T: crate::binding::IIndexAware
Sets the index of each sorted item to its position before the change set is forwarded
(UpdateIndex).
Deviation (DEVIATIONS.md, DynamicData): the change sets keep their type (sorted, paged or virtual), where upstream's are typed as sorted change sets.
virtualise
fn virtualise(self: &Self, virtual_requests: std::rc::Rc<dyn ferroui_system::IObservable<crate::cache::VirtualRequest>>) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::cache::VirtualChangeSet<T, K>>>
The window of the sorted items that the latest request of virtual_requests asks
for, with the indexes of its changes (Virtualise(IObservable<IVirtualRequest>),
obsolete upstream).
top_sorted
fn top_sorted(self: &Self, size: usize) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::cache::VirtualChangeSet<T, K>>>
The first size sorted items (Top(int size) of sorted change sets, obsolete
upstream).
Deviation (DEVIATIONS.md, DynamicData): named top_sorted, as top is the operator of
every cache, which a sorted stream also has.
Panics
When size is 0 (ArgumentOutOfRangeException).
page
fn page(self: &Self, page_requests: std::rc::Rc<dyn ferroui_system::IObservable<crate::cache::PageRequest>>) -> std::rc::Rc<dyn ferroui_system::IObservable<crate::cache::PagedChangeSet<T, K>>>
The page of the sorted items that the latest request of page_requests asks for, with
the indexes of its changes (Page(IObservable<IPageRequest>), obsolete upstream).
Trait implementations
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.