pub trait BitStore: Shl<u32, Output = Self> + ShlAssign<u32> + Sized + From<u32> + Sub<Output = Self> + Add<Output = Self> + Mul<Output = Self> + Div<Output = Self> + AddAssign + PartialOrd + Copy + Debug {
    const BITS: u32;
    const ZERO: Self;
    const ONE: Self;

    // Required method
    fn log2(self) -> u32;
}
Expand description

A trait for a type that can be used for the internal integer representation of an encoder or decoder

Required Associated Constants§

source

const BITS: u32

the number of bits needed to represent this type

source

const ZERO: Self

the additive identity

source

const ONE: Self

the multiplicative identity

Required Methods§

source

fn log2(self) -> u32

integer natural logarithm, rounded down

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl BitStore for u32

source§

const BITS: u32 = 32u32

source§

const ONE: u32 = 1u32

source§

const ZERO: u32 = 0u32

source§

fn log2(self) -> u32

source§

impl BitStore for u64

source§

const BITS: u32 = 64u32

source§

const ONE: u64 = 1u64

source§

const ZERO: u64 = 0u64

source§

fn log2(self) -> u32

source§

impl BitStore for u128

source§

const BITS: u32 = 128u32

source§

const ONE: u128 = 1u128

source§

const ZERO: u128 = 0u128

source§

fn log2(self) -> u32

Implementors§