pub struct BitReaderLsb<'a> { /* private fields */ }Expand description
LSB-first bit reader. See module docs for the LSB convention.
Copy+Clone for the same reason as BitReader — no heap state.
Implementations§
Source§impl<'a> BitReaderLsb<'a>
impl<'a> BitReaderLsb<'a>
pub fn new(data: &'a [u8]) -> Self
pub fn bit_position(&self) -> u64
pub fn is_byte_aligned(&self) -> bool
pub fn read_u32(&mut self, n: u32) -> Result<u32>
pub fn read_u64(&mut self, n: u32) -> Result<u64>
pub fn read_i32(&mut self, n: u32) -> Result<i32>
pub fn read_bit(&mut self) -> Result<bool>
Trait Implementations§
Source§impl<'a> Clone for BitReaderLsb<'a>
impl<'a> Clone for BitReaderLsb<'a>
Source§fn clone(&self) -> BitReaderLsb<'a>
fn clone(&self) -> BitReaderLsb<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<'a> Copy for BitReaderLsb<'a>
Auto Trait Implementations§
impl<'a> Freeze for BitReaderLsb<'a>
impl<'a> RefUnwindSafe for BitReaderLsb<'a>
impl<'a> Send for BitReaderLsb<'a>
impl<'a> Sync for BitReaderLsb<'a>
impl<'a> Unpin for BitReaderLsb<'a>
impl<'a> UnsafeUnpin for BitReaderLsb<'a>
impl<'a> UnwindSafe for BitReaderLsb<'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