Trait arrow2_convert::field::ArrowField
source · pub trait ArrowField {
type Type;
// Required method
fn data_type() -> DataType;
}
Expand description
Trait implemented by all types that can be used as an Arrow field.
Implementations are provided for types already supported by the arrow2 crate:
- numeric types:
u8
,u16
,u32
,u64
,i8
,i16
,i32
,i128
,i64
,f32
,f64
, - other types:
bool
,String
- temporal types:
chrono::NaiveDate
,chrono::NaiveDateTime
Custom implementations can be provided for other types.
The trait simply requires defining the ArrowField::data_type
Serialize and Deserialize functionality requires implementing the crate::ArrowSerialize
and the crate::ArrowDeserialize
traits respectively.