Trait parquet2::types::NativeType

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

    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 Types§

source

type Bytes: AsRef<[u8]> + for<'a> TryFrom<&'a [u8], Error = TryFromSliceError>

Required Associated Constants§

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

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl NativeType for f32

§

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§

const TYPE: PhysicalType = PhysicalType::Float

source§

impl NativeType for f64

§

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§

const TYPE: PhysicalType = PhysicalType::Double

source§

impl NativeType for i32

§

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§

const TYPE: PhysicalType = PhysicalType::Int32

source§

impl NativeType for i64

§

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§

const TYPE: PhysicalType = PhysicalType::Int64

source§

impl NativeType for [u32; 3]

source§

const TYPE: PhysicalType = PhysicalType::Int96

§

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§