pub trait VirtualCollectionSource<K, T>: Observable<u64> {
// Required methods
fn revision(&self) -> u64;
fn keys(&self) -> Vec<K>;
fn item(&self, key: &K) -> Option<T>;
fn changes_since(&self, revision: u64) -> CollectionSync<K>;
// Provided method
fn window(&self) -> CollectionWindow { ... }
}Expand description
Architecture-neutral data source consumed by VirtualList.
Sources without an incremental journal may always return
CollectionSync::Reset. The default VirtualCollectionModel keeps a
bounded key-only journal so normal insert, remove, move, and update
operations do not require rebuilding collection metrics.
Required Methods§
fn revision(&self) -> u64
fn keys(&self) -> Vec<K>
fn item(&self, key: &K) -> Option<T>
fn changes_since(&self, revision: u64) -> CollectionSync<K>
Provided Methods§
fn window(&self) -> CollectionWindow
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".