Trait polars_core::datatypes::PolarsDataType

source ·
pub unsafe trait PolarsDataType: Send + Sync + Sized {
    type Physical<'a>: Debug + Clone;
    type OwnedPhysical: Debug + Send + Sync + Clone + PartialEq;
    type ZeroablePhysical<'a>: Zeroable + From<Self::Physical<'a>>;
    type Array: for<'a> StaticArray<ValueT<'a> = Self::Physical<'a>, ZeroableValueT<'a> = Self::ZeroablePhysical<'a>>;
    type IsNested;
    type HasViews;

    // 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 + Clone

source

type OwnedPhysical: Debug + Send + Sync + Clone + PartialEq

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 IsNested

source

type HasViews

Required Methods§

source

fn get_dtype() -> DataType
where Self: Sized,

Object Safety§

This trait is not object safe.

Implementors§

source§

impl PolarsDataType for BinaryOffsetType

§

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

§

type OwnedPhysical = Box<[u8]>

§

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

§

type Array = BinaryArray<i64>

§

type IsNested = FalseT

§

type HasViews = FalseT

source§

impl PolarsDataType for BinaryType

§

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

§

type OwnedPhysical = Box<[u8]>

§

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

§

type Array = BinaryViewArrayGeneric<[u8]>

§

type IsNested = FalseT

§

type HasViews = TrueT

source§

impl PolarsDataType for BooleanType

§

type Physical<'a> = bool

§

type OwnedPhysical = bool

§

type ZeroablePhysical<'a> = bool

§

type Array = BooleanArray

§

type IsNested = FalseT

§

type HasViews = FalseT

source§

impl PolarsDataType for CategoricalType

§

type Physical<'a> = u32

§

type OwnedPhysical = u32

§

type ZeroablePhysical<'a> = u32

§

type Array = PrimitiveArray<u32>

§

type IsNested = FalseT

§

type HasViews = FalseT

source§

impl PolarsDataType for DateType

§

type Physical<'a> = i32

§

type OwnedPhysical = i32

§

type ZeroablePhysical<'a> = i32

§

type Array = PrimitiveArray<i32>

§

type IsNested = FalseT

§

type HasViews = FalseT

source§

impl PolarsDataType for DatetimeType

§

type Physical<'a> = i64

§

type OwnedPhysical = i64

§

type ZeroablePhysical<'a> = i64

§

type Array = PrimitiveArray<i64>

§

type IsNested = FalseT

§

type HasViews = FalseT

source§

impl PolarsDataType for DecimalType

§

type Physical<'a> = i128

§

type OwnedPhysical = i128

§

type ZeroablePhysical<'a> = i128

§

type Array = PrimitiveArray<i128>

§

type IsNested = FalseT

§

type HasViews = FalseT

source§

impl PolarsDataType for DurationType

§

type Physical<'a> = i64

§

type OwnedPhysical = i64

§

type ZeroablePhysical<'a> = i64

§

type Array = PrimitiveArray<i64>

§

type IsNested = FalseT

§

type HasViews = FalseT

source§

impl PolarsDataType for Float32Type

§

type Physical<'a> = f32

§

type OwnedPhysical = f32

§

type ZeroablePhysical<'a> = f32

§

type Array = PrimitiveArray<f32>

§

type IsNested = FalseT

§

type HasViews = FalseT

source§

impl PolarsDataType for Float64Type

§

type Physical<'a> = f64

§

type OwnedPhysical = f64

§

type ZeroablePhysical<'a> = f64

§

type Array = PrimitiveArray<f64>

§

type IsNested = FalseT

§

type HasViews = FalseT

source§

impl PolarsDataType for Int8Type

§

type Physical<'a> = i8

§

type OwnedPhysical = i8

§

type ZeroablePhysical<'a> = i8

§

type Array = PrimitiveArray<i8>

§

type IsNested = FalseT

§

type HasViews = FalseT

source§

impl PolarsDataType for Int16Type

§

type Physical<'a> = i16

§

type OwnedPhysical = i16

§

type ZeroablePhysical<'a> = i16

§

type Array = PrimitiveArray<i16>

§

type IsNested = FalseT

§

type HasViews = FalseT

source§

impl PolarsDataType for Int32Type

§

type Physical<'a> = i32

§

type OwnedPhysical = i32

§

type ZeroablePhysical<'a> = i32

§

type Array = PrimitiveArray<i32>

§

type IsNested = FalseT

§

type HasViews = FalseT

source§

impl PolarsDataType for Int64Type

§

type Physical<'a> = i64

§

type OwnedPhysical = i64

§

type ZeroablePhysical<'a> = i64

§

type Array = PrimitiveArray<i64>

§

type IsNested = FalseT

§

type HasViews = FalseT

source§

impl PolarsDataType for Int128Type

Available on crate feature dtype-decimal only.
§

type Physical<'a> = i128

§

type OwnedPhysical = i128

§

type ZeroablePhysical<'a> = i128

§

type Array = PrimitiveArray<i128>

§

type IsNested = FalseT

§

type HasViews = FalseT

source§

impl PolarsDataType for ListType

§

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

§

type OwnedPhysical = Box<dyn Array>

§

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

§

type Array = ListArray<i64>

§

type IsNested = TrueT

§

type HasViews = FalseT

source§

impl PolarsDataType for StringType

§

type Physical<'a> = &'a str

§

type OwnedPhysical = String

§

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

§

type Array = BinaryViewArrayGeneric<str>

§

type IsNested = FalseT

§

type HasViews = TrueT

source§

impl PolarsDataType for TimeType

§

type Physical<'a> = i64

§

type OwnedPhysical = i64

§

type ZeroablePhysical<'a> = i64

§

type Array = PrimitiveArray<i64>

§

type IsNested = FalseT

§

type HasViews = FalseT

source§

impl PolarsDataType for UInt8Type

§

type Physical<'a> = u8

§

type OwnedPhysical = u8

§

type ZeroablePhysical<'a> = u8

§

type Array = PrimitiveArray<u8>

§

type IsNested = FalseT

§

type HasViews = FalseT

source§

impl PolarsDataType for UInt16Type

§

type Physical<'a> = u16

§

type OwnedPhysical = u16

§

type ZeroablePhysical<'a> = u16

§

type Array = PrimitiveArray<u16>

§

type IsNested = FalseT

§

type HasViews = FalseT

source§

impl PolarsDataType for UInt32Type

§

type Physical<'a> = u32

§

type OwnedPhysical = u32

§

type ZeroablePhysical<'a> = u32

§

type Array = PrimitiveArray<u32>

§

type IsNested = FalseT

§

type HasViews = FalseT

source§

impl PolarsDataType for UInt64Type

§

type Physical<'a> = u64

§

type OwnedPhysical = u64

§

type ZeroablePhysical<'a> = u64

§

type Array = PrimitiveArray<u64>

§

type IsNested = FalseT

§

type HasViews = FalseT

source§

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

Available on crate feature object only.