#[non_exhaustive]#[repr(i32)]pub enum TypeId {
Show 29 variants
Empty = 0,
Int8 = 1,
Int16 = 2,
Int32 = 3,
Int64 = 4,
Uint8 = 5,
Uint16 = 6,
Uint32 = 7,
Uint64 = 8,
Float32 = 9,
Float64 = 10,
Bool8 = 11,
TimestampDays = 12,
TimestampSeconds = 13,
TimestampMilliseconds = 14,
TimestampMicroseconds = 15,
TimestampNanoseconds = 16,
DurationDays = 17,
DurationSeconds = 18,
DurationMilliseconds = 19,
DurationMicroseconds = 20,
DurationNanoseconds = 21,
Dictionary32 = 22,
String = 23,
List = 24,
Decimal32 = 25,
Decimal64 = 26,
Decimal128 = 27,
Struct = 28,
}Expand description
Identifies the element type stored in a Column.
This enum mirrors cudf::type_id and covers all data types supported
by libcudf, including numeric, temporal, string, and nested types.
IMPORTANT: Synchronization requirement – The discriminant values in
this enum MUST match cudf::type_id (C++) exactly. The cxx bridge passes
type IDs as i32, so this enum’s #[repr(i32)] values are the source of
truth on the Rust side. If you add or reorder variants, update both the
C++ cudf::type_id mapping and this enum.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Empty = 0
Empty (no data)
Int8 = 1
Signed 8-bit integer
Int16 = 2
Signed 16-bit integer
Int32 = 3
Signed 32-bit integer
Int64 = 4
Signed 64-bit integer
Uint8 = 5
Unsigned 8-bit integer
Uint16 = 6
Unsigned 16-bit integer
Uint32 = 7
Unsigned 32-bit integer
Uint64 = 8
Unsigned 64-bit integer
Float32 = 9
32-bit floating point
Float64 = 10
64-bit floating point
Bool8 = 11
Boolean (stored as 8-bit)
TimestampDays = 12
Timestamp in days since epoch
TimestampSeconds = 13
Timestamp in seconds since epoch
TimestampMilliseconds = 14
Timestamp in milliseconds since epoch
TimestampMicroseconds = 15
Timestamp in microseconds since epoch
TimestampNanoseconds = 16
Timestamp in nanoseconds since epoch
DurationDays = 17
Duration in days
DurationSeconds = 18
Duration in seconds
DurationMilliseconds = 19
Duration in milliseconds
DurationMicroseconds = 20
Duration in microseconds
DurationNanoseconds = 21
Duration in nanoseconds
Dictionary32 = 22
Dictionary-encoded column (32-bit indices)
String = 23
Variable-length UTF-8 string
List = 24
List (nested column of variable-length sequences)
Decimal32 = 25
32-bit fixed-point decimal
Decimal64 = 26
64-bit fixed-point decimal
Decimal128 = 27
128-bit fixed-point decimal
Struct = 28
Struct (nested column of named fields)
Implementations§
Source§impl TypeId
impl TypeId
Sourcepub fn size_in_bytes(self) -> usize
pub fn size_in_bytes(self) -> usize
Returns the size in bytes of a single element of this type. Returns 0 for variable-width types (String, List, Struct).
Sourcepub fn is_fixed_width(self) -> bool
pub fn is_fixed_width(self) -> bool
Whether this type has a fixed width (known size per element).
Sourcepub fn is_numeric(self) -> bool
pub fn is_numeric(self) -> bool
Whether this type is a numeric type (integer or floating point).
Sourcepub fn is_integer(self) -> bool
pub fn is_integer(self) -> bool
Whether this type is an integer type.
Sourcepub fn is_floating(self) -> bool
pub fn is_floating(self) -> bool
Whether this type is a floating-point type.
Sourcepub fn is_temporal(self) -> bool
pub fn is_temporal(self) -> bool
Whether this type is a temporal type (timestamp or duration).