pub enum CellValue {
Empty,
Bool(bool),
Number(f64),
String(String),
Formula {
expr: String,
result: Option<Box<CellValue>>,
},
Date(f64),
Error(String),
RichString(Vec<RichTextRun>),
}Expand description
Represents the value of a cell.
Variants§
Empty
No value (empty cell).
Bool(bool)
Boolean value.
Number(f64)
Numeric value (integers are stored as f64 in Excel).
String(String)
String value.
Formula
Formula with optional cached result.
Date(f64)
A date/time value stored as an Excel serial number. Integer part = days since 1899-12-30 (Excel epoch). Fractional part = time of day (0.5 = noon).
Error(String)
Error value (e.g. #DIV/0!, #N/A, #VALUE!).
RichString(Vec<RichTextRun>)
Rich text: multiple formatted runs within a single cell.
Trait Implementations§
Source§impl From<NaiveDateTime> for CellValue
impl From<NaiveDateTime> for CellValue
Source§fn from(datetime: NaiveDateTime) -> Self
fn from(datetime: NaiveDateTime) -> Self
Converts to this type from the input type.
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 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