pub struct TableState {
pub id: CompactString,
pub columns: Vec<ColumnState>,
pub highlights: Highlights,
pub highlights_changed: bool,
pub active_rows: Vec<usize>,
pub selected_rows: RoaringBitmap,
pub expanded_rows: RoaringBitmap,
pub last_clicked_visible_index: Option<usize>,
pub filter_matches: RoaringBitmap,
pub filter_cache_dirty: bool,
pub sorted_children_cache: HashMap<usize, Vec<usize>, RandomState>,
}Fields§
§id: CompactString§columns: Vec<ColumnState>§highlights: Highlights§highlights_changed: bool§active_rows: Vec<usize>§selected_rows: RoaringBitmap§expanded_rows: RoaringBitmap§last_clicked_visible_index: Option<usize>§filter_matches: RoaringBitmap§filter_cache_dirty: bool§sorted_children_cache: HashMap<usize, Vec<usize>, RandomState>Implementations§
Source§impl TableState
impl TableState
pub fn new(id: impl Into<CompactString>, row_count: usize) -> Self
pub fn get_filter_state(&self) -> Vec<(usize, Filter)>
pub fn get_sort_state(&self) -> Option<(usize, bool)>
pub fn counts_header(&self, row_len: usize) -> String
pub fn process_responses( &mut self, provider: &dyn TableProvider, responses: Vec<ColResponse>, ) -> Result<(), TableError>
pub fn apply_new_sort( &mut self, provider: &dyn TableProvider, sort_col: usize, ) -> Result<(), TableError>
pub fn apply_all_filters( &mut self, provider: &dyn TableProvider, filters: &[(usize, Filter)], ) -> Result<(), TableError>
pub fn apply_incremental_filter( &mut self, provider: &dyn TableProvider, filter_col: usize, filter: &Filter, ) -> Result<(), TableError>
Sourcepub fn show_tree_cell(
&mut self,
ui: &mut Ui,
row_index: usize,
hierarchy: RowHierarchy,
) -> bool
pub fn show_tree_cell( &mut self, ui: &mut Ui, row_index: usize, hierarchy: RowHierarchy, ) -> bool
Renders the tree indentation guidelines and expand/collapse arrow inside a tree cell.
Returns true if the expansion state changed (allowing immediate-mode viewport updates).
pub fn handle_row_selection(&mut self, modifiers: Modifiers, row_index: usize)
Sourcepub fn rebuild_tree_filter_cache(&mut self, provider: &dyn TableProvider)
pub fn rebuild_tree_filter_cache(&mut self, provider: &dyn TableProvider)
Rebuilds the O(N) reverse-propagation subtree filter cache from scratch if dirty.
Sourcepub fn flatten_tree(&mut self, provider: &dyn TableProvider)
pub fn flatten_tree(&mut self, provider: &dyn TableProvider)
Recursively flattens the visible tree nodes matching the active filters into active_rows.
Trait Implementations§
Source§impl Debug for TableState
impl Debug for TableState
Source§impl Default for TableState
impl Default for TableState
Source§fn default() -> TableState
fn default() -> TableState
Returns the “default value” for a type. Read more
Source§impl TableStateExt for TableState
impl TableStateExt for TableState
fn collect_responses(&mut self, responses: Vec<ColResponse>) -> TableChanges
Auto Trait Implementations§
impl Freeze for TableState
impl RefUnwindSafe for TableState
impl Send for TableState
impl Sync for TableState
impl Unpin for TableState
impl UnsafeUnpin for TableState
impl UnwindSafe for TableState
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