Expand description
Core data model for the grid: cell values, columns, and the rectangular
GridData container.
GridData is intentionally simple — a column list paired with a Vec of
rectangular rows of CellValue. It carries no rendering, sorting, or
filtering state: those live on crate::grid::GridState. Keeping the data
layer pure makes it reusable from outside the widget (export pipelines,
server-side previews, test fixtures).
CellValue does not implement Eq/Ord because CellValue::Decimal
holds an f64. Use compare_cells when you need a deterministic total
ordering that handles NaN and mixed numeric kinds deliberately rather
than collapsing to Equal.
Structs§
- Column
- A single column declaration.
- Grid
Data - Rectangular grid data:
rows.len()rows each of lengthcolumns.len().
Enums§
- Cell
Value - A single cell value.
- Column
Kind - Declared column kind. Drives the default
crate::config::ResolvedColumnFormatwhen nocrate::config::ColumnOverrideis supplied. - Grid
Data Error - Error returned when
GridDatacannot be constructed or validated because at least one row’s length disagrees with the column count.
Functions§
- compare_
cells - Total deterministic ordering for
CellValue. - sample_
data - A handful of synthetic ledger-style rows for examples and the sample
application. Kept here so examples have a known shape without pulling in a
separate data file. Production code should construct
GridDatadirectly.