Enum csv_perusal::CSVType
source · pub enum CSVType {
Int(i64),
Float(f64),
String(String),
Date(NaiveDate),
Time(NaiveTime),
DateTime(NaiveDateTime),
Error(CellError),
Empty,
}Expand description
CSVType is the organized the data from csv::ByteRecord.
It’s meant to make the generic output data from the csv package easier to work with by giving each cell a specific data type.
Date, Time, and DateTime use chrono’s chrono::NaiveDate, chrono::NaiveTime, and chrono::NaiveDateTime respectively.
Variants§
Int(i64)
Float(f64)
String(String)
Date(NaiveDate)
Time(NaiveTime)
DateTime(NaiveDateTime)
Error(CellError)
Empty
Trait Implementations§
source§impl<'de> Deserialize<'de> for CSVType
impl<'de> Deserialize<'de> for CSVType
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq for CSVType
impl PartialEq for CSVType
source§impl PartialOrd for CSVType
impl PartialOrd for CSVType
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moreimpl StructuralPartialEq for CSVType
Auto Trait Implementations§
impl Freeze for CSVType
impl RefUnwindSafe for CSVType
impl Send for CSVType
impl Sync for CSVType
impl Unpin for CSVType
impl UnwindSafe for CSVType
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)