pub enum ArrowType {
Null,
Boolean,
Int32,
Int64,
UInt32,
UInt64,
Float32,
Float64,
String,
LargeString,
Utf8View,
Dictionary(CategoricalIndexType),
}Expand description
§ArrowType
Unified representation of supported Apache Arrow data types in Minarrow.
§Purpose
- Encodes the physical type and, for temporal variants, associated unit information for all supported Minarrow arrays.
- Provides a single discriminant used across the crate for schema definitions, type matching, and Arrow FFI export.
- Implements a focused subset of the official Arrow type specification:
https://arrow.apache.org/docs/python/api/datatypes.html.
§Coverage
- Core primitives: integer, floating-point, boolean.
- Strings: UTF-8 (
String) and optionally large UTF-8 (LargeString). - Dictionary-encoded strings: via
Dictionary(CategoricalIndexType). - Optional temporal types:
date,time,duration,timestamp, andintervalwith explicit units. Null: placeholder or metadata-only fields.
§Interoperability
- Directly compatible with the Apache Arrow C Data Interface type descriptors.
- Preserves type and temporal unit information when arrays are transmitted over FFI.
- Simplifies Minarrow’s type system (e.g., one
DatetimeArraytype) while taggingArrowTypeonFieldfor ecosystem compatibility.
§Notes
- For
DatetimeArraytypes,ArrowTypereflects only the physical encoding.
Logical distinctions (e.g., interpreting aDate64as a timestamp vs. a duration) are stored inFieldmetadata. - Dictionary key widths are defined by the associated
CategoricalIndexType.
Variants§
Null
Boolean
Int32
Int64
UInt32
UInt64
Float32
Float64
String
LargeString
Utf8View
Dictionary(CategoricalIndexType)
Trait Implementations§
impl Eq for ArrowType
impl StructuralPartialEq for ArrowType
Auto Trait Implementations§
impl Freeze for ArrowType
impl RefUnwindSafe for ArrowType
impl Send for ArrowType
impl Sync for ArrowType
impl Unpin for ArrowType
impl UnsafeUnpin for ArrowType
impl UnwindSafe for ArrowType
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