BitReadEndian

Trait BitReadEndian 

Source
pub trait BitReadEndian {
    // Required methods
    fn peek_val(&mut self, n: usize) -> u64;
    fn merge_val(msp: u64, lsp: u64, msb: usize, lsb: usize) -> u64;
    fn build_cache(cache: u64, refill: u64, cache_size: usize) -> u64;
    fn skip_rem(&mut self, n: usize);
}
Expand description

Used to interact with a sequence of 64 bits, taking into account the relative endianness.

This trait also offers some methods to read and remove bits from an internal 64-bit cache.

Required Methods§

Source

fn peek_val(&mut self, n: usize) -> u64

Peeks n bits from the cache.

Source

fn merge_val(msp: u64, lsp: u64, msb: usize, lsb: usize) -> u64

Merges two sequences of bits together.

Source

fn build_cache(cache: u64, refill: u64, cache_size: usize) -> u64

Builds a new cache.

Source

fn skip_rem(&mut self, n: usize)

Removes n bits from the cache.

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.

Implementors§