pub enum DataType {
Show 21 variants
Bool,
F32,
F64,
I32,
I64,
U8,
U64,
Usize,
Str,
String,
Object,
OptBool,
OptF32,
OptF64,
OptI32,
OptI64,
OptUsize,
VecUsize,
DateTime(TimeUnit),
TimeDelta,
Unknown,
}Expand description
Represents the various data types supported by the system.
This enum encapsulates both primitive and complex data types, including numeric types, strings, optional types, and time-related types (when the “time” feature is enabled).
Variants§
Bool
Boolean type
F32
32-bit floating point type
F64
64-bit floating point type
I32
32-bit signed integer type
I64
64-bit signed integer type
U8
8-bit unsigned integer type
U64
64-bit unsigned integer type
Usize
Platform-specific size type
Str
String slice type
String
Owned String type
Object
Generic Object type
OptBool
Optional Boolean type
OptF32
Optional 32-bit floating point type
OptF64
Optional 64-bit floating point type
OptI32
Optional 32-bit signed integer type
OptI64
Optional 64-bit signed integer type
OptUsize
Optional platform-specific size type
VecUsize
Vector of platform-specific size type
DateTime(TimeUnit)
DateTime type with specified TimeUnit (only available with “time” feature)
TimeDelta
TimeDelta type (only available with “time” feature)
Unknown
Unknown type
Implementations§
Source§impl DataType
impl DataType
Sourcepub fn is_float(&self) -> bool
pub fn is_float(&self) -> bool
Checks if the DataType is a floating-point type.
§Returns
true if the DataType is F32, F64, OptF32, or OptF64, false otherwise.
Sourcepub fn is_int(&self) -> bool
pub fn is_int(&self) -> bool
Checks if the DataType is an integer type.
§Returns
true if the DataType is I32, I64, Usize, U64, OptUsize, OptI32, or OptI64, false otherwise.
Sourcepub fn is_time(&self) -> bool
pub fn is_time(&self) -> bool
Checks if the DataType is a time-related type.
§Returns
true if the DataType is DateTime (when the “time” feature is enabled), false otherwise.