pub enum Data {
Int(i64),
Float(f64),
String(String),
Bool(bool),
DateTime(ExcelDateTime),
DateTimeIso(String),
DurationIso(String),
Error(CellErrorType),
Empty,
}
Expand description
An enum to represent all different data types that can appear as a value in a worksheet cell
Variants§
Int(i64)
Signed integer
Float(f64)
Float
String(String)
String
Bool(bool)
Boolean
DateTime(ExcelDateTime)
Date or Time
DateTimeIso(String)
Date, Time or Date/Time in ISO 8601
DurationIso(String)
Duration in ISO 8601
Error(CellErrorType)
Error
Empty
Empty cell
Trait Implementations§
Source§impl DataType for Data
An enum to represent all different data types that can appear as
a value in a worksheet cell
impl DataType for Data
An enum to represent all different data types that can appear as a value in a worksheet cell
Source§fn is_duration_iso(&self) -> bool
fn is_duration_iso(&self) -> bool
Assess if datatype is an ISO8601 duration
Source§fn is_datetime(&self) -> bool
fn is_datetime(&self) -> bool
Assess if datatype is a datetime
Source§fn is_datetime_iso(&self) -> bool
fn is_datetime_iso(&self) -> bool
Assess if datatype is an ISO8601 datetime
Source§fn get_string(&self) -> Option<&str>
fn get_string(&self) -> Option<&str>
Try getting string value
Source§fn get_datetime(&self) -> Option<ExcelDateTime>
fn get_datetime(&self) -> Option<ExcelDateTime>
Try getting datetime value
Source§fn get_datetime_iso(&self) -> Option<&str>
fn get_datetime_iso(&self) -> Option<&str>
Try getting datetime ISO8601 value
Source§fn get_duration_iso(&self) -> Option<&str>
fn get_duration_iso(&self) -> Option<&str>
Try getting duration ISO8601 value
Source§fn get_error(&self) -> Option<&CellErrorType>
fn get_error(&self) -> Option<&CellErrorType>
Try getting Error value
Source§fn as_duration(&self) -> Option<Duration>
fn as_duration(&self) -> Option<Duration>
Try converting data type into a duration
Source§fn as_datetime(&self) -> Option<NaiveDateTime>
fn as_datetime(&self) -> Option<NaiveDateTime>
Try converting data type into a datetime
Source§impl<'de> Deserialize<'de> for Data
impl<'de> Deserialize<'de> for Data
Source§fn deserialize<D>(deserializer: D) -> Result<Data, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Data, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<CellErrorType> for Data
impl From<CellErrorType> for Data
Source§fn from(v: CellErrorType) -> Self
fn from(v: CellErrorType) -> Self
Converts to this type from the input type.
Source§impl<'a> ToCellDeserializer<'a> for Data
impl<'a> ToCellDeserializer<'a> for Data
impl CellType for Data
impl StructuralPartialEq for Data
Auto Trait Implementations§
impl Freeze for Data
impl RefUnwindSafe for Data
impl Send for Data
impl Sync for Data
impl Unpin for Data
impl UnwindSafe for Data
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