Trait arrow_array::types::ArrowPrimitiveType
source · 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 bridging 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 Types§
sourcetype Native: ArrowNativeTypeOp
type Native: ArrowNativeTypeOp
Corresponding Rust native type for the primitive type.
Required Associated Constants§
Provided Methods§
sourcefn get_byte_width() -> usize
fn get_byte_width() -> usize
Returns the byte width of this primitive type.
sourcefn 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()
.
Object Safety§
This trait is not object safe.