Trait parquet2::encoding::bitpacked::Unpackable

source ·
pub trait Unpackable: Copy + Sized + Default {
    type Packed: Packed;
    type Unpacked: Unpacked<Self>;

    // Required methods
    fn unpack(packed: &[u8], num_bits: usize, unpacked: &mut Self::Unpacked);
    fn pack(unpacked: &Self::Unpacked, num_bits: usize, packed: &mut [u8]);
}
Expand description

A type representing a type that can be bitpacked and unpacked by this crate.

Required Associated Types§

Required Methods§

source

fn unpack(packed: &[u8], num_bits: usize, unpacked: &mut Self::Unpacked)

source

fn pack(unpacked: &Self::Unpacked, num_bits: usize, packed: &mut [u8])

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Unpackable for u8

§

type Packed = [u8; 8]

§

type Unpacked = [u8; 8]

source§

fn unpack(packed: &[u8], num_bits: usize, unpacked: &mut Self::Unpacked)

source§

fn pack(packed: &Self::Unpacked, num_bits: usize, unpacked: &mut [u8])

source§

impl Unpackable for u16

§

type Packed = [u8; 32]

§

type Unpacked = [u16; 16]

source§

fn unpack(packed: &[u8], num_bits: usize, unpacked: &mut Self::Unpacked)

source§

fn pack(packed: &Self::Unpacked, num_bits: usize, unpacked: &mut [u8])

source§

impl Unpackable for u32

§

type Packed = [u8; 128]

§

type Unpacked = [u32; 32]

source§

fn unpack(packed: &[u8], num_bits: usize, unpacked: &mut Self::Unpacked)

source§

fn pack(packed: &Self::Unpacked, num_bits: usize, unpacked: &mut [u8])

source§

impl Unpackable for u64

§

type Packed = [u8; 4096]

§

type Unpacked = [u64; 64]

source§

fn unpack(packed: &[u8], num_bits: usize, unpacked: &mut Self::Unpacked)

source§

fn pack(packed: &Self::Unpacked, num_bits: usize, unpacked: &mut [u8])

Implementors§