pub struct BitReader<'a> { /* private fields */ }Expand description
Bit reader that reads from a byte slice.
Implementations§
Source§impl<'a> BitReader<'a>
impl<'a> BitReader<'a>
Sourcepub fn advance_bits(&mut self, n: u32)
pub fn advance_bits(&mut self, n: u32)
Advance by n bits.
Sourcepub fn align_to_byte(&mut self)
pub fn align_to_byte(&mut self)
Align to byte boundary by skipping remaining bits in current byte.
Sourcepub fn bit_position(&self) -> u64
pub fn bit_position(&self) -> u64
Get the current bit position.
Sourcepub fn byte_position(&self) -> usize
pub fn byte_position(&self) -> usize
Get the current byte position (bytes consumed from stream).
Sourcepub fn remaining_bits(&self) -> u64
pub fn remaining_bits(&self) -> u64
Remaining bits available.
Auto Trait Implementations§
impl<'a> Freeze for BitReader<'a>
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§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more