pub struct BitPumpMsbWords<'a, const W: usize> { /* private fields */ }Expand description
MSB-first bit order inside little-endian words of W bytes (2 or 4).
Implementations§
Source§impl<'a, const W: usize> BitPumpMsbWords<'a, W>
impl<'a, const W: usize> BitPumpMsbWords<'a, W>
Sourcepub fn data(&self) -> &'a [u8] ⓘ
pub fn data(&self) -> &'a [u8] ⓘ
Remaining unread input (from the byte position of the refill cursor).
Sourcepub fn buffered_bits(&self) -> u32
pub fn buffered_bits(&self) -> u32
Bits currently buffered.
Sourcepub fn bit_position(&self) -> u64
pub fn bit_position(&self) -> u64
Bits consumed from the start of the input (padding past the end included).
Trait Implementations§
Source§impl<const W: usize> BitRead for BitPumpMsbWords<'_, W>
impl<const W: usize> BitRead for BitPumpMsbWords<'_, W>
Source§fn refill_force(&mut self)
fn refill_force(&mut self)
Refill to the pump’s maximum fill level even if 32 or more bits are buffered.
Source§fn peek_no_fill(&self, n: u32) -> u32
fn peek_no_fill(&self, n: u32) -> u32
Peek
n <= 32 bits. Requires a prior BitRead::fill.Source§fn skip_no_fill(&mut self, n: u32)
fn skip_no_fill(&mut self, n: u32)
Discard
n <= 32 bits. Requires that n bits are buffered.Source§fn byte_position(&self) -> usize
fn byte_position(&self) -> usize
Number of bytes consumed from the input (bits not yet used are excluded).
Source§fn overrun(&self) -> usize
fn overrun(&self) -> usize
Bytes requested past the end of the input (0 for a well-formed stream). Includes
look-ahead that has not been consumed; see
BitRead::past_end.Source§fn past_end(&self) -> usize
fn past_end(&self) -> usize
Bytes consumed beyond the end of the input (padding fed but still buffered is
not counted). Decoders use this to detect truncated streams precisely.
Source§fn fill_to(&mut self, n: u32)
fn fill_to(&mut self, n: u32)
Ensure at least
n bits (n <= 56) are buffered (zero padding past the end).fn peek(&mut self, n: u32) -> u32
fn get(&mut self, n: u32) -> u32
fn skip(&mut self, n: u32)
Auto Trait Implementations§
impl<'a, const W: usize> Freeze for BitPumpMsbWords<'a, W>
impl<'a, const W: usize> RefUnwindSafe for BitPumpMsbWords<'a, W>
impl<'a, const W: usize> Send for BitPumpMsbWords<'a, W>
impl<'a, const W: usize> Sync for BitPumpMsbWords<'a, W>
impl<'a, const W: usize> Unpin for BitPumpMsbWords<'a, W>
impl<'a, const W: usize> UnsafeUnpin for BitPumpMsbWords<'a, W>
impl<'a, const W: usize> UnwindSafe for BitPumpMsbWords<'a, W>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more