[][src]Trait arrow::datatypes::ArrowPrimitiveType

pub trait ArrowPrimitiveType: 'static {
    type Native: ArrowNativeType;
    fn get_data_type() -> DataType;

    fn get_bit_width() -> usize { ... }
fn default_value() -> Self::Native { ... }
unsafe fn index(raw_ptr: *const Self::Native, i: usize) -> Self::Native { ... } }

Trait indicating a primitive fixed-width type (bool, ints and floats).

Associated Types

type Native: ArrowNativeType

Corresponding Rust native type for the primitive type.

Loading content...

Required methods

fn get_data_type() -> DataType

Returns the corresponding Arrow data type of this primitive type.

Loading content...

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.

Loading content...

Implementors

impl ArrowPrimitiveType for BooleanType[src]

type Native = bool

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.

impl ArrowPrimitiveType for Date32Type[src]

impl ArrowPrimitiveType for Date64Type[src]

impl ArrowPrimitiveType for DurationMicrosecondType[src]

impl ArrowPrimitiveType for DurationMillisecondType[src]

impl ArrowPrimitiveType for DurationNanosecondType[src]

impl ArrowPrimitiveType for DurationSecondType[src]

impl ArrowPrimitiveType for Float32Type[src]

impl ArrowPrimitiveType for Float64Type[src]

impl ArrowPrimitiveType for Int8Type[src]

impl ArrowPrimitiveType for Int16Type[src]

impl ArrowPrimitiveType for Int32Type[src]

impl ArrowPrimitiveType for Int64Type[src]

impl ArrowPrimitiveType for IntervalDayTimeType[src]

impl ArrowPrimitiveType for IntervalYearMonthType[src]

impl ArrowPrimitiveType for Time32MillisecondType[src]

impl ArrowPrimitiveType for Time32SecondType[src]

impl ArrowPrimitiveType for Time64MicrosecondType[src]

impl ArrowPrimitiveType for Time64NanosecondType[src]

impl ArrowPrimitiveType for TimestampMicrosecondType[src]

impl ArrowPrimitiveType for TimestampMillisecondType[src]

impl ArrowPrimitiveType for TimestampNanosecondType[src]

impl ArrowPrimitiveType for TimestampSecondType[src]

impl ArrowPrimitiveType for UInt8Type[src]

impl ArrowPrimitiveType for UInt16Type[src]

impl ArrowPrimitiveType for UInt32Type[src]

impl ArrowPrimitiveType for UInt64Type[src]

Loading content...