pub struct LiveGrid { /* private fields */ }Expand description
Shows views of a densa_data::LiveTable in the grid, formatted like an ArrowTable.
It keeps a formatter for each of the live table’s batches; view brings them
up to date first, which allocates only when batches were added or compacted since the
last call. Columns are sized from the first rows, as in ArrowTable. Given another
table (or a clone), it rebuilds its formatters; for a table with another schema it also
resets its column settings.
Implementations§
Source§impl LiveGrid
impl LiveGrid
Sourcepub fn new(table: &LiveTable) -> Self
pub fn new(table: &LiveTable) -> Self
A grid for views of table, with formatters for its current batches.
Sourcepub fn columns(&self) -> Vec<Column>
pub fn columns(&self) -> Vec<Column>
Grid columns, as ArrowTable::columns.
Sourcepub fn set_decimals(
&mut self,
column: usize,
decimals: Option<usize>,
) -> Result<(), TableError>
pub fn set_decimals( &mut self, column: usize, decimals: Option<usize>, ) -> Result<(), TableError>
Sourcepub fn set_column_chars(
&mut self,
column: usize,
chars: usize,
) -> Result<(), TableError>
pub fn set_column_chars( &mut self, column: usize, chars: usize, ) -> Result<(), TableError>
Sourcepub fn view<'a>(
&'a mut self,
table: &'a LiveTable,
view: ViewId,
first_row: usize,
palette: &Palette,
) -> Option<LiveGridView<'a>>
pub fn view<'a>( &'a mut self, table: &'a LiveTable, view: ViewId, first_row: usize, palette: &Palette, ) -> Option<LiveGridView<'a>>
A GridSource showing view view of table from first_row (scrolled), or
None if the view does not exist. Call it each frame, after the table’s changes.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for LiveGrid
impl !UnwindSafe for LiveGrid
impl Freeze for LiveGrid
impl Send for LiveGrid
impl Sync for LiveGrid
impl Unpin for LiveGrid
impl UnsafeUnpin for LiveGrid
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