pub unsafe trait PolarsDataType: Send + Sync + Sized {
    type Physical<'a>: Debug;
    type ZeroablePhysical<'a>: Zeroable + From<Self::Physical<'a>>;
    type Array: for<'a> StaticArray<ValueT<'a> = Self::Physical<'a>, ZeroableValueT<'a> = Self::ZeroablePhysical<'a>>;
    type Structure;

    // Required method
    fn get_dtype() -> DataType
       where Self: Sized;
}
Expand description

Safety

The StaticArray and dtype return must be correct.

Required Associated Types§

source

type Physical<'a>: Debug

source

type ZeroablePhysical<'a>: Zeroable + From<Self::Physical<'a>>

source

type Array: for<'a> StaticArray<ValueT<'a> = Self::Physical<'a>, ZeroableValueT<'a> = Self::ZeroablePhysical<'a>>

source

type Structure

Required Methods§

source

fn get_dtype() -> DataTypewhere Self: Sized,

Object Safety§

This trait is not object safe.

Implementors§

source§

impl PolarsDataType for BinaryType

§

type Physical<'a> = &'a [u8]

§

type ZeroablePhysical<'a> = Option<&'a [u8]>

§

type Array = BinaryArray<i64>

§

type Structure = Flat

source§

impl PolarsDataType for BooleanType

§

type Physical<'a> = bool

§

type ZeroablePhysical<'a> = bool

§

type Array = BooleanArray

§

type Structure = Flat

source§

impl PolarsDataType for CategoricalType

§

type Physical<'a> = u32

§

type ZeroablePhysical<'a> = u32

§

type Array = PrimitiveArray<u32>

§

type Structure = Flat

source§

impl PolarsDataType for DateType

§

type Physical<'a> = i32

§

type ZeroablePhysical<'a> = i32

§

type Array = PrimitiveArray<i32>

§

type Structure = Flat

source§

impl PolarsDataType for DatetimeType

§

type Physical<'a> = i64

§

type ZeroablePhysical<'a> = i64

§

type Array = PrimitiveArray<i64>

§

type Structure = Flat

source§

impl PolarsDataType for DecimalType

§

type Physical<'a> = i128

§

type ZeroablePhysical<'a> = i128

§

type Array = PrimitiveArray<i128>

§

type Structure = Flat

source§

impl PolarsDataType for DurationType

§

type Physical<'a> = i64

§

type ZeroablePhysical<'a> = i64

§

type Array = PrimitiveArray<i64>

§

type Structure = Flat

source§

impl PolarsDataType for FixedSizeListType

Available on crate feature dtype-array only.
§

type Physical<'a> = Box<dyn Array>

§

type ZeroablePhysical<'a> = Option<Box<dyn Array>>

§

type Array = FixedSizeListArray

§

type Structure = Nested

source§

impl PolarsDataType for Float32Type

§

type Physical<'a> = f32

§

type ZeroablePhysical<'a> = f32

§

type Array = PrimitiveArray<f32>

§

type Structure = Flat

source§

impl PolarsDataType for Float64Type

§

type Physical<'a> = f64

§

type ZeroablePhysical<'a> = f64

§

type Array = PrimitiveArray<f64>

§

type Structure = Flat

source§

impl PolarsDataType for Int8Type

§

type Physical<'a> = i8

§

type ZeroablePhysical<'a> = i8

§

type Array = PrimitiveArray<i8>

§

type Structure = Flat

source§

impl PolarsDataType for Int16Type

§

type Physical<'a> = i16

§

type ZeroablePhysical<'a> = i16

§

type Array = PrimitiveArray<i16>

§

type Structure = Flat

source§

impl PolarsDataType for Int32Type

§

type Physical<'a> = i32

§

type ZeroablePhysical<'a> = i32

§

type Array = PrimitiveArray<i32>

§

type Structure = Flat

source§

impl PolarsDataType for Int64Type

§

type Physical<'a> = i64

§

type ZeroablePhysical<'a> = i64

§

type Array = PrimitiveArray<i64>

§

type Structure = Flat

source§

impl PolarsDataType for Int128Type

Available on crate feature dtype-decimal only.
§

type Physical<'a> = i128

§

type ZeroablePhysical<'a> = i128

§

type Array = PrimitiveArray<i128>

§

type Structure = Flat

source§

impl PolarsDataType for ListType

§

type Physical<'a> = Box<dyn Array>

§

type ZeroablePhysical<'a> = Option<Box<dyn Array>>

§

type Array = ListArray<i64>

§

type Structure = Nested

source§

impl PolarsDataType for TimeType

§

type Physical<'a> = i64

§

type ZeroablePhysical<'a> = i64

§

type Array = PrimitiveArray<i64>

§

type Structure = Flat

source§

impl PolarsDataType for UInt8Type

§

type Physical<'a> = u8

§

type ZeroablePhysical<'a> = u8

§

type Array = PrimitiveArray<u8>

§

type Structure = Flat

source§

impl PolarsDataType for UInt16Type

§

type Physical<'a> = u16

§

type ZeroablePhysical<'a> = u16

§

type Array = PrimitiveArray<u16>

§

type Structure = Flat

source§

impl PolarsDataType for UInt32Type

§

type Physical<'a> = u32

§

type ZeroablePhysical<'a> = u32

§

type Array = PrimitiveArray<u32>

§

type Structure = Flat

source§

impl PolarsDataType for UInt64Type

§

type Physical<'a> = u64

§

type ZeroablePhysical<'a> = u64

§

type Array = PrimitiveArray<u64>

§

type Structure = Flat

source§

impl PolarsDataType for Utf8Type

§

type Physical<'a> = &'a str

§

type ZeroablePhysical<'a> = Option<&'a str>

§

type Array = Utf8Array<i64>

§

type Structure = Flat

source§

impl<T> PolarsDataType for ObjectType<T>where T: PolarsObject,

Available on crate feature object only.