polars_parquet::parquet::types

Trait NativeType

Source
pub trait NativeType:
    Debug
    + Send
    + Sync
    + 'static
    + Copy
    + Clone {
    type Bytes: AsRef<[u8]> + Pod + IntoIterator<Item = u8> + for<'a> TryFrom<&'a [u8], Error = TryFromSliceError> + Debug + Clone + Copy;

    const TYPE: PhysicalType;

    // Required methods
    fn to_le_bytes(&self) -> Self::Bytes;
    fn from_le_bytes(bytes: Self::Bytes) -> Self;
    fn ord(&self, other: &Self) -> Ordering;
}
Expand description

A physical native representation of a Parquet fixed-sized type.

Required Associated Constants§

Required Associated Types§

Source

type Bytes: AsRef<[u8]> + Pod + IntoIterator<Item = u8> + for<'a> TryFrom<&'a [u8], Error = TryFromSliceError> + Debug + Clone + Copy

Required Methods§

Source

fn to_le_bytes(&self) -> Self::Bytes

Source

fn from_le_bytes(bytes: Self::Bytes) -> Self

Source

fn ord(&self, other: &Self) -> Ordering

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.

Implementations on Foreign Types§

Source§

impl NativeType for f32

Source§

const TYPE: PhysicalType = PhysicalType::Float

Source§

type Bytes = [u8; 4]

Source§

fn to_le_bytes(&self) -> Self::Bytes

Source§

fn from_le_bytes(bytes: Self::Bytes) -> Self

Source§

fn ord(&self, other: &Self) -> Ordering

Source§

impl NativeType for f64

Source§

const TYPE: PhysicalType = PhysicalType::Double

Source§

type Bytes = [u8; 8]

Source§

fn to_le_bytes(&self) -> Self::Bytes

Source§

fn from_le_bytes(bytes: Self::Bytes) -> Self

Source§

fn ord(&self, other: &Self) -> Ordering

Source§

impl NativeType for i32

Source§

const TYPE: PhysicalType = PhysicalType::Int32

Source§

type Bytes = [u8; 4]

Source§

fn to_le_bytes(&self) -> Self::Bytes

Source§

fn from_le_bytes(bytes: Self::Bytes) -> Self

Source§

fn ord(&self, other: &Self) -> Ordering

Source§

impl NativeType for i64

Source§

const TYPE: PhysicalType = PhysicalType::Int64

Source§

type Bytes = [u8; 8]

Source§

fn to_le_bytes(&self) -> Self::Bytes

Source§

fn from_le_bytes(bytes: Self::Bytes) -> Self

Source§

fn ord(&self, other: &Self) -> Ordering

Source§

impl NativeType for [u32; 3]

Source§

const TYPE: PhysicalType = PhysicalType::Int96

Source§

type Bytes = [u8; 12]

Source§

fn to_le_bytes(&self) -> Self::Bytes

Source§

fn from_le_bytes(bytes: Self::Bytes) -> Self

Source§

fn ord(&self, other: &Self) -> Ordering

Implementors§