Trait ArrowPrimitiveType
pub trait ArrowPrimitiveType: PrimitiveTypeSealed + 'static {
type Native: ArrowNativeTypeOp;
const DATA_TYPE: DataType;
// Provided methods
fn get_byte_width() -> usize { ... }
fn default_value() -> Self::Native { ... }
}
Expand description
Trait for primitive values.
This trait bridges the dynamic-typed nature of Arrow
(via DataType
) with the static-typed nature of rust types
(ArrowNativeType
) for all types that implement ArrowNativeType
.
Required Associated Constants§
Required Associated Types§
type Native: ArrowNativeTypeOp
type Native: ArrowNativeTypeOp
Corresponding Rust native type for the primitive type.
Provided Methods§
fn get_byte_width() -> usize
👎Deprecated: Use ArrowNativeType::get_byte_width
fn get_byte_width() -> usize
Returns the byte width of this primitive type.
fn default_value() -> Self::Native
fn default_value() -> Self::Native
Returns a default value of this primitive type.
This is useful for aggregate array ops like sum()
, mean()
.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.