#[non_exhaustive]pub struct CellDiff {
pub address: CellAddress,
pub value: Option<ValueChange>,
pub formula: Option<FormulaChange>,
pub format: Option<FormatChange>,
pub diagnostics: Vec<Diagnostic>,
}Expand description
A merged per-cell diff entry (RFC-033 §5).
One CellDiff per logical address. This is the intended consumer model:
a value change and a formula change at the same address are facets of one
change, carried in the independent value and formula sub-fields, not
two separate entries. The output::view::CellChangeRow projection follows
the same rule (one row per address, with formula_changed / old_formula /
new_formula describing the formula facet). Consumers migrating from a
per-facet model should collapse to one row per address rather than preserve
the split.
change_kind() is derived from the sub-fields, not stored.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.address: CellAddress§value: Option<ValueChange>§formula: Option<FormulaChange>§format: Option<FormatChange>Reserved until RFC-022.
diagnostics: Vec<Diagnostic>Implementations§
Source§impl CellDiff
impl CellDiff
Sourcepub fn change_kind(&self) -> CellChangeKind
pub fn change_kind(&self) -> CellChangeKind
Derive Added / Removed / Modified from the sub-change fields.
- Added: every present sub-change has an empty/absent
oldside. - Removed: every present sub-change has an empty/absent
newside. - Modified: otherwise.
This derivation is stable API: the rule above will not change within a major version, so downstream code may depend on it rather than re-deriving presence classification from the sub-fields.