pub struct BitReader<'a> { /* private fields */ }Expand description
MSB-first bit reader over a byte slice.
Implementations§
Source§impl<'a> BitReader<'a>
impl<'a> BitReader<'a>
pub fn new(data: &'a [u8]) -> Self
Sourcepub fn bit_position(&self) -> u64
pub fn bit_position(&self) -> u64
Current read offset in bits, measured from the start of the input.
pub fn bits_remaining(&self) -> u64
pub fn is_byte_aligned(&self) -> bool
Sourcepub fn align_to_byte(&mut self)
pub fn align_to_byte(&mut self)
Discard bits up to the next byte boundary (§7.2 byte_aligned()).
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> UnsafeUnpin 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