pub enum Type {
Unsigned,
Signed,
Float,
Boolean,
Date,
DateTime,
NULL,
Text,
}Expand description
Data type detected for a CSV field.
Variants§
Unsigned
Unsigned integer (non-negative whole number).
Signed
Signed integer (whole number, possibly negative).
Float
Floating point number.
Boolean
Boolean value (true/false, yes/no, 0/1, etc.).
Date
Date value (without time component).
DateTime
DateTime value (date with time component).
NULL
Null/empty value.
Text
Text/string value (fallback type).
Implementations§
Source§impl Type
impl Type
Sourcepub const fn as_index(&self) -> usize
pub const fn as_index(&self) -> usize
Returns the index for this type (0-7), suitable for array indexing.
This index is based on type priority (see priority()), not enum
declaration order: NULL=0, Boolean=1, Unsigned=2, Signed=3, Float=4,
Date=5, DateTime=6, Text=7.
Sourcepub fn is_numeric(&self) -> bool
pub fn is_numeric(&self) -> bool
Returns true if this type is numeric.
Sourcepub fn is_temporal(&self) -> bool
pub fn is_temporal(&self) -> bool
Returns true if this type is temporal.
Trait Implementations§
impl Copy for Type
impl Eq for Type
impl StructuralPartialEq for Type
Auto Trait Implementations§
impl Freeze for Type
impl RefUnwindSafe for Type
impl Send for Type
impl Sync for Type
impl Unpin for Type
impl UnwindSafe for Type
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