[−][src]Trait arrow::datatypes::ArrowPrimitiveType
Trait indicating a primitive fixed-width type (bool, ints and floats).
Associated Types
type Native: ArrowNativeType
Corresponding Rust native type for the primitive type.
Required methods
fn get_data_type() -> DataType
Returns the corresponding Arrow data type of this primitive type.
Provided methods
fn get_bit_width() -> usize
Returns the bit width of this primitive type.
fn default_value() -> Self::Native
Returns a default value of this primitive type.
This is useful for aggregate array ops like sum()
, mean()
.
unsafe fn index(raw_ptr: *const Self::Native, i: usize) -> Self::Native
Returns a value offset from the given pointer by the given index. The default implementation (used for all non-boolean types) is simply equivalent to pointer-arithmetic.
Safety
Just like array-access in C: the raw_ptr must be the start of a valid array, and the index must be less than the size of the array.
Implementors
impl ArrowPrimitiveType for BooleanType
[src]
type Native = bool
fn get_data_type() -> DataType
[src]
fn get_bit_width() -> usize
[src]
unsafe fn index(raw_ptr: *const Self::Native, i: usize) -> Self::Native
[src]
Safety
The pointer must be part of a bit-packed boolean array, and the index must be less than the size of the array.