Skip to main content

Module data

Module data 

Source
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.
GridData
Rectangular grid data: rows.len() rows each of length columns.len().

Enums§

CellValue
A single cell value.
ColumnKind
Declared column kind. Drives the default crate::config::ResolvedColumnFormat when no crate::config::ColumnOverride is supplied.
GridDataError
Error returned when GridData cannot 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 GridData directly.