pub trait ToArrowArray: Sized {
// Required methods
fn to_arrow_array(data: &[Self]) -> ArrowResult<ArrayRef>;
fn arrow_data_type() -> DataType;
}Expand description
Trait for types that can be converted to Arrow arrays
Implemented for primitive numeric types (f32, f64, i32, i64, etc.), boolean, and String types.
Required Methods§
Sourcefn to_arrow_array(data: &[Self]) -> ArrowResult<ArrayRef>
fn to_arrow_array(data: &[Self]) -> ArrowResult<ArrayRef>
Convert a slice of data to an Arrow array
Sourcefn arrow_data_type() -> DataType
fn arrow_data_type() -> DataType
Get the Arrow DataType for this Rust type
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".