pub enum CellInput {
Literal(Value),
Formula(String),
}Expand description
What a Workbook::set writes into a cell: a literal value or a formula.
This is the parsed shape the caller hands set; the surface layers (WASM,
MCP, REST) decide how to turn a user’s raw string into one of these (a
leading = selects CellInput::Formula, everything else is a literal).
Keeping the discriminator explicit here avoids guessing inside the value
object and keeps set engine-agnostic about input syntax while still
validating formula syntax against the locked engine.
Variants§
Literal(Value)
A literal cell value (schema spec §4 — a value-only cell). Must not be
Value::Empty: an empty literal is byte-indistinguishable from an
absent cell, so it is rejected (clear the cell instead).
Formula(String)
A formula, stored verbatim including the leading =. Its syntax is
validated against the workbook’s locked engine on set; its value is
Value::Empty until the next recalc (P3.3).