pub enum CellValue {
Empty,
Text(String),
Number(f64),
Bool(bool),
Date(NaiveDate),
DateTime(NaiveDateTime),
Formula(String),
Error(String),
Image(CellImage),
}Expand description
单元格值
Variants§
Empty
空单元格
Text(String)
文本
Number(f64)
数值
Bool(bool)
布尔
Date(NaiveDate)
日期
DateTime(NaiveDateTime)
日期时间(无时区,Excel 语义)
Formula(String)
公式(写出时按公式写;读入时保留原始公式文本)
Error(String)
Excel 错误值(#DIV/0! 等)
Image(CellImage)
图片(写出时嵌入单元格;读入来自内嵌图片)
Implementations§
Source§impl CellValue
impl CellValue
pub fn type_name(&self) -> &'static str
pub fn to_f64(&self) -> Option<f64>
pub fn to_i64(&self) -> Option<i64>
pub fn to_bool(&self) -> Option<bool>
pub fn to_decimal(&self) -> Option<Decimal>
pub fn to_date(&self) -> Option<NaiveDate>
pub fn to_datetime(&self) -> Option<NaiveDateTime>
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