pub enum DataChange {
ItemsInserted {
range: Range<usize>,
},
ItemsRemoved {
range: Range<usize>,
},
ItemsMoved {
from: usize,
to: usize,
count: usize,
},
ItemUpdated {
index: usize,
},
WindowLoaded {
range: Range<usize>,
},
Reset,
}Expand description
Describes a mutation to a flat list. Emitted by crate::ListModel automatically
and by crate::ListDataSource implementors manually.
Variants§
ItemsInserted
Rows were inserted; range holds the indices of the newly inserted items.
ItemsRemoved
Rows were removed; range holds the indices they occupied before removal.
ItemsMoved
A contiguous block of count rows moved from from to to (post-removal index).
ItemUpdated
A single row’s data changed in place without any structural shift.
WindowLoaded
A window of previously-Loading rows became Ready (lazy / windowed
sources). Semantically like ItemsInserted for a row-height cache
(divergence = range.start), but no rows were added — the count was
already declared — so a SelectionModel must NOT index-shift for it.
Reset
The entire list was replaced; consumers must discard all cached state and rebuild.
Trait Implementations§
Source§impl Clone for DataChange
impl Clone for DataChange
Source§fn clone(&self) -> DataChange
fn clone(&self) -> DataChange
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DataChange
impl Debug for DataChange
impl Eq for DataChange
Source§impl PartialEq for DataChange
impl PartialEq for DataChange
Source§fn eq(&self, other: &DataChange) -> bool
fn eq(&self, other: &DataChange) -> bool
self and other values to be equal, and is used by ==.