pub trait SortedObservableCacheEx<T: Clone + 'static, K: Eq + Hash + Clone + 'static, C: ISortedChangeSet<T, K>> {
// Required methods
fn sorted_source(&self) -> Rc<dyn IObservable<C>>;
fn sorted_change_sets(&self) -> Rc<dyn IObservable<SortedChangeSet<T, K>>>;
// Provided methods
fn as_sorted_aggregator(&self) -> TypedChangeSetAggregator<T, K, C> { ... }
fn treat_moves_as_remove_add(
&self,
) -> Rc<dyn IObservable<SortedChangeSet<T, K>>> { ... }
fn update_index(&self) -> Rc<dyn IObservable<C>>
where T: IIndexAware { ... }
fn virtualise(
&self,
virtual_requests: Rc<dyn IObservable<VirtualRequest>>,
) -> Rc<dyn IObservable<VirtualChangeSet<T, K>>> { ... }
fn top_sorted(
&self,
size: usize,
) -> Rc<dyn IObservable<VirtualChangeSet<T, K>>> { ... }
fn page(
&self,
page_requests: Rc<dyn IObservable<PageRequest>>,
) -> Rc<dyn IObservable<PagedChangeSet<T, K>>> { ... }
}Expand description
The operators of sorted change sets (ObservableCacheEx over ISortedChangeSet), for every
sequence of sorted, paged or virtual change sets C.
Required Methods§
Sourcefn sorted_source(&self) -> Rc<dyn IObservable<C>>
fn sorted_source(&self) -> Rc<dyn IObservable<C>>
The sequence itself.
Sourcefn sorted_change_sets(&self) -> Rc<dyn IObservable<SortedChangeSet<T, K>>>
fn sorted_change_sets(&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>).
Provided Methods§
Sourcefn as_sorted_aggregator(&self) -> TypedChangeSetAggregator<T, K, C>
fn as_sorted_aggregator(&self) -> TypedChangeSetAggregator<T, K, C>
Records the change sets, the items and the end of the sequence, for tests
(TestEx.AsAggregator of sorted, paged and virtual change sets, which make a
SortedChangeSetAggregator, a PagedChangeSetAggregator or a
VirtualChangeSetAggregator).
Sourcefn treat_moves_as_remove_add(
&self,
) -> Rc<dyn IObservable<SortedChangeSet<T, K>>>
fn treat_moves_as_remove_add( &self, ) -> Rc<dyn IObservable<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).
Sourcefn update_index(&self) -> Rc<dyn IObservable<C>>where
T: IIndexAware,
fn update_index(&self) -> Rc<dyn IObservable<C>>where
T: 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.
Sourcefn virtualise(
&self,
virtual_requests: Rc<dyn IObservable<VirtualRequest>>,
) -> Rc<dyn IObservable<VirtualChangeSet<T, K>>>
fn virtualise( &self, virtual_requests: Rc<dyn IObservable<VirtualRequest>>, ) -> Rc<dyn IObservable<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).
Sourcefn top_sorted(&self, size: usize) -> Rc<dyn IObservable<VirtualChangeSet<T, K>>>
fn top_sorted(&self, size: usize) -> Rc<dyn IObservable<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).
Sourcefn page(
&self,
page_requests: Rc<dyn IObservable<PageRequest>>,
) -> Rc<dyn IObservable<PagedChangeSet<T, K>>>
fn page( &self, page_requests: Rc<dyn IObservable<PageRequest>>, ) -> Rc<dyn IObservable<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).
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".