Skip to main content

BitPack

Trait BitPack 

Source
pub(crate) trait BitPack<A, B> {
    type PackedSize: ArraySize;

    // Required methods
    fn pack(&self) -> Array<u8, Self::PackedSize>;
    fn unpack(enc: &Array<u8, Self::PackedSize>) -> Self;
}
Expand description

BitPack represents range-encoding logic

Required Associated Types§

Required Methods§

Source

fn pack(&self) -> Array<u8, Self::PackedSize>

Source

fn unpack(enc: &Array<u8, Self::PackedSize>) -> 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<A, B> BitPack<A, B> for Polynomial<BaseField>

Source§

impl<K, A, B> BitPack<A, B> for Vector<BaseField, K>

Implementors§