polars::prelude::datatypes

Trait PolarsDataType

Source
pub unsafe trait PolarsDataType:
    Sized
    + Send
    + Sync {
    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;
    type IsStruct;
    type IsObject;

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

Source

type IsStruct

Source

type IsObject

Required Methods§

Source

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

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl PolarsDataType for BinaryOffsetType

Source§

impl PolarsDataType for BinaryType

Source§

impl PolarsDataType for BooleanType

Source§

impl PolarsDataType for CategoricalType

Source§

impl PolarsDataType for DateType

Source§

impl PolarsDataType for DatetimeType

Source§

impl PolarsDataType for DecimalType

Source§

impl PolarsDataType for DurationType

Source§

impl PolarsDataType for FixedSizeListType

Available on crate feature dtype-array only.
Source§

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

Source§

type OwnedPhysical = Box<dyn Array>

Source§

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

Source§

type Array = FixedSizeListArray

Source§

type IsNested = TrueT

Source§

type HasViews = FalseT

Source§

type IsStruct = FalseT

Source§

type IsObject = FalseT

Source§

impl PolarsDataType for Float32Type

Source§

impl PolarsDataType for Float64Type

Source§

impl PolarsDataType for Int8Type

Source§

impl PolarsDataType for Int16Type

Source§

impl PolarsDataType for Int32Type

Source§

impl PolarsDataType for Int64Type

Source§

impl PolarsDataType for Int128Type

Available on crate feature dtype-decimal only.
Source§

impl PolarsDataType for ListType

Source§

impl PolarsDataType for StringType

Source§

impl PolarsDataType for StructType

Available on crate feature dtype-struct only.
Source§

impl PolarsDataType for TimeType

Source§

impl PolarsDataType for UInt8Type

Source§

impl PolarsDataType for UInt16Type

Source§

impl PolarsDataType for UInt32Type

Source§

impl PolarsDataType for UInt64Type

Source§

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

Available on crate feature object only.