struct MsbBuffer {
code_size: u8,
buffer: u64,
bits_in_buffer: u8,
}
Fields§
§code_size: u8
The current code length.
buffer: u64
The buffer bits.
bits_in_buffer: u8
The number of valid buffer bits.
Trait Implementations§
source§impl Buffer for MsbBuffer
impl Buffer for MsbBuffer
fn new(min_size: u8) -> Self
source§fn buffer_code(&mut self, code: u16)
fn buffer_code(&mut self, code: u16)
Insert a code into the buffer.
source§fn push_out(&mut self, out: &mut &mut [u8]) -> bool
fn push_out(&mut self, out: &mut &mut [u8]) -> bool
Push bytes if the buffer space is getting small.
source§fn flush_out(&mut self, out: &mut &mut [u8]) -> bool
fn flush_out(&mut self, out: &mut &mut [u8]) -> bool
Flush all full bytes, returning if at least one more byte remains.
source§fn buffer_pad(&mut self)
fn buffer_pad(&mut self)
Pad the buffer to a full byte.
source§fn bump_code_size(&mut self)
fn bump_code_size(&mut self)
Increase the maximum code size.
Auto Trait Implementations§
impl Freeze for MsbBuffer
impl RefUnwindSafe for MsbBuffer
impl Send for MsbBuffer
impl Sync for MsbBuffer
impl Unpin for MsbBuffer
impl UnwindSafe for MsbBuffer
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