#[non_exhaustive]pub enum DocValue {
String(String),
Bool(bool),
Int(i64),
Float(f64),
DateTime(DateTime<Utc>),
Date(NaiveDate),
NaiveDateTime(NaiveDateTime),
Empty,
RichText(Vec<RichRun>),
Image(ImageData),
}Expand description
通用文档值 – Rust 类型与 DOCX 内容之间的桥梁。
每个 DocConverter 都从此枚举读取或写入,正如 CellValue 在 Rust 类型与
Excel 单元格数据之间充当中介。
对应 Java: com.alibaba.excel.metadata.data.CellValue / ReadCellData / WriteCellData
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.
String(String)
纯文本字符串。
Bool(bool)
布尔值。
Int(i64)
64 位有符号整数。
Float(f64)
64 位浮点数。
DateTime(DateTime<Utc>)
UTC 日期时间。
Date(NaiveDate)
仅日期(无时间分量)。
NaiveDateTime(NaiveDateTime)
无时区的日期时间。
Empty
空值 / null。
RichText(Vec<RichRun>)
富文本(格式化文本片段)。
Image(ImageData)
图片数据(原始字节 + 元数据)。
Trait Implementations§
Source§impl From<NaiveDateTime> for DocValue
impl From<NaiveDateTime> for DocValue
Source§fn from(v: NaiveDateTime) -> DocValue
fn from(v: NaiveDateTime) -> DocValue
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for DocValue
impl RefUnwindSafe for DocValue
impl Send for DocValue
impl Sync for DocValue
impl Unpin for DocValue
impl UnsafeUnpin for DocValue
impl UnwindSafe for DocValue
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