arrow_row::fixed

Trait FixedLengthEncoding

Source
pub trait FixedLengthEncoding: Copy {
    type Encoded: Sized + Copy + FromSlice + AsRef<[u8]> + AsMut<[u8]>;

    const ENCODED_LEN: usize = _;

    // Required methods
    fn encode(self) -> Self::Encoded;
    fn decode(encoded: Self::Encoded) -> Self;
}
Expand description

Encodes a value of a particular fixed width type into bytes according to the rules described on super::RowConverter

Provided Associated Constants§

Required Associated Types§

Required Methods§

Source

fn encode(self) -> Self::Encoded

Source

fn decode(encoded: Self::Encoded) -> Self

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 FixedLengthEncoding for bool

Source§

type Encoded = [u8; 1]

Source§

fn encode(self) -> [u8; 1]

Source§

fn decode(encoded: Self::Encoded) -> Self

Source§

impl FixedLengthEncoding for f32

Source§

type Encoded = [u8; 4]

Source§

fn encode(self) -> [u8; 4]

Source§

fn decode(encoded: Self::Encoded) -> Self

Source§

impl FixedLengthEncoding for f64

Source§

type Encoded = [u8; 8]

Source§

fn encode(self) -> [u8; 8]

Source§

fn decode(encoded: Self::Encoded) -> Self

Source§

impl FixedLengthEncoding for i8

Source§

type Encoded = [u8; 1]

Source§

fn encode(self) -> [u8; 1]

Source§

fn decode(encoded: Self::Encoded) -> Self

Source§

impl FixedLengthEncoding for i16

Source§

type Encoded = [u8; 2]

Source§

fn encode(self) -> [u8; 2]

Source§

fn decode(encoded: Self::Encoded) -> Self

Source§

impl FixedLengthEncoding for i32

Source§

type Encoded = [u8; 4]

Source§

fn encode(self) -> [u8; 4]

Source§

fn decode(encoded: Self::Encoded) -> Self

Source§

impl FixedLengthEncoding for i64

Source§

type Encoded = [u8; 8]

Source§

fn encode(self) -> [u8; 8]

Source§

fn decode(encoded: Self::Encoded) -> Self

Source§

impl FixedLengthEncoding for i128

Source§

type Encoded = [u8; 16]

Source§

fn encode(self) -> [u8; 16]

Source§

fn decode(encoded: Self::Encoded) -> Self

Source§

impl FixedLengthEncoding for u8

Source§

type Encoded = [u8; 1]

Source§

fn encode(self) -> [u8; 1]

Source§

fn decode(encoded: Self::Encoded) -> Self

Source§

impl FixedLengthEncoding for u16

Source§

type Encoded = [u8; 2]

Source§

fn encode(self) -> [u8; 2]

Source§

fn decode(encoded: Self::Encoded) -> Self

Source§

impl FixedLengthEncoding for u32

Source§

type Encoded = [u8; 4]

Source§

fn encode(self) -> [u8; 4]

Source§

fn decode(encoded: Self::Encoded) -> Self

Source§

impl FixedLengthEncoding for u64

Source§

type Encoded = [u8; 8]

Source§

fn encode(self) -> [u8; 8]

Source§

fn decode(encoded: Self::Encoded) -> Self

Source§

impl FixedLengthEncoding for f16

Source§

type Encoded = [u8; 2]

Source§

fn encode(self) -> [u8; 2]

Source§

fn decode(encoded: Self::Encoded) -> Self

Source§

impl FixedLengthEncoding for IntervalDayTime

Source§

type Encoded = [u8; 8]

Source§

fn encode(self) -> Self::Encoded

Source§

fn decode(encoded: Self::Encoded) -> Self

Source§

impl FixedLengthEncoding for IntervalMonthDayNano

Source§

type Encoded = [u8; 16]

Source§

fn encode(self) -> Self::Encoded

Source§

fn decode(encoded: Self::Encoded) -> Self

Source§

impl FixedLengthEncoding for i256

Source§

type Encoded = [u8; 32]

Source§

fn encode(self) -> [u8; 32]

Source§

fn decode(encoded: Self::Encoded) -> Self

Implementors§