#[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
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Empty
Text(String)
Integer(i64)
Number(f64)
Bool(bool)
DateTime(CellDateTime)
Duration(CellDuration)
Error(CellError)
Unsupported
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.
Trait Implementations§
impl StructuralPartialEq for CellValue
Auto Trait Implementations§
impl Freeze for CellValue
impl RefUnwindSafe for CellValue
impl Send for CellValue
impl Sync for CellValue
impl Unpin for CellValue
impl UnsafeUnpin for CellValue
impl UnwindSafe for CellValue
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more