pub struct TableGrid {
pub rows: u32,
pub cols: u32,
pub cells: Vec<GridCell>,
}Expand description
A structured table grid with cell-level data including spans.
Fields§
§rows: u32Number of rows.
cols: u32Number of columns.
cells: Vec<GridCell>All cells in the table as a flat, sparse list.
The list is ordered by (row, col) but is not a dense rows × cols matrix: cells
that are covered by a spanning cell (via row_span > 1 or col_span > 1) do not appear
in the list. Only the top-left “origin” cell of a span is present, with its row_span
and col_span fields set accordingly.
To reconstruct the full visual grid, iterate over all cells and mark the rectangular
region [row .. row+row_span, col .. col+col_span] as occupied by that cell. Any
(row, col) position that is not the origin of any cell is covered by a span from an
earlier cell.
The length of this vec is ≤ rows * cols. An empty table (rows == 0 || cols == 0)
produces an empty vec.
Trait Implementations§
impl Eq for TableGrid
impl StructuralPartialEq for TableGrid
Auto Trait Implementations§
impl Freeze for TableGrid
impl RefUnwindSafe for TableGrid
impl Send for TableGrid
impl Sync for TableGrid
impl Unpin for TableGrid
impl UnsafeUnpin for TableGrid
impl UnwindSafe for TableGrid
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.