[][src]Struct x3::bitreader::BitReader

pub struct BitReader<'a> { /* fields omitted */ }

Implementations

impl<'a> BitReader<'a>[src]

pub fn new(array: &'a [u8]) -> Self[src]

pub fn inc_bits(&mut self, n: usize)[src]

Increment the bits, load a new byte if required.

pub fn read_nbits(&mut self, n: usize) -> u32[src]

Read the n number of bites in a packed bit array.

Arguments

  • num_bits - The number of bits to read.

Returns

  • The unsigned value returned.

pub fn count_zero_bits(&mut self) -> usize[src]

Read the number of zeros in a packed bit array. Loads a new byte if needed.

Returns

  • the number of consectutive zeros found in the array.

Auto Trait Implementations

impl<'a> RefUnwindSafe for BitReader<'a>

impl<'a> Send for BitReader<'a>

impl<'a> Sync for BitReader<'a>

impl<'a> Unpin for BitReader<'a>

impl<'a> UnwindSafe for BitReader<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.