#[non_exhaustive]pub enum CellValue {
Empty,
Text(String),
Integer(i64),
Number(f64),
Bool(bool),
DateTime(CellDateTime),
Duration(CellDuration),
Error(CellError),
Unsupported {
display: String,
reason: String,
},
}Expand description
Typed representation of a spreadsheet cell value (RFC-033 §2).
Integer and Number are kept distinct (reflecting calamine’s Data::Int
/ Data::Float). Default comparison treats Integer(1) vs Number(1.0)
as a TypeChanged difference; cross-type numeric equality is opt-in
(RFC-019).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Empty
Text(String)
Integer(i64)
Cannot occur through any .xlsx input this crate accepts: calamine’s
Xlsx reader routes every numeric cell through Data::Float, never
Data::Int. A match arm on this variant is unreachable today; it is
retained against future input-format support, not as a live case.
Number(f64)
Bool(bool)
DateTime(CellDateTime)
Duration(CellDuration)
Cannot occur through any .xlsx input this crate accepts: the only
calamine source this maps from, Data::DurationIso, is emitted by
calamine’s ODS reader only, and this crate opens workbooks exclusively
via calamine::Xlsx (open.rs). A match arm on this variant is
unreachable today; it is retained against future input-format
support, not as a live case.
Error(CellError)
Unsupported
Cannot occur: nothing in this crate constructs Unsupported. A match
arm on this variant is unreachable today; it is retained as a
forward-compatible catch-all for a future cell shape with no typed
representation here, not as a live case.
Implementations§
Source§impl CellValue
impl CellValue
Sourcepub fn display_string(&self) -> String
pub fn display_string(&self) -> String
A human-readable display string. For use in reports only; never used as an equality key.
Sourcepub fn display_default(&self) -> String
pub fn display_default(&self) -> String
Alias for display_string — preferred name per RFC-020.