struct OutputBufferOxide<'a> {
pub inner: &'a mut [u8],
pub inner_pos: usize,
pub local: bool,
pub bit_buffer: u32,
pub bits_in: u32,
}
Fields§
§inner: &'a mut [u8]
§inner_pos: usize
§local: bool
§bit_buffer: u32
§bits_in: u32
Implementations§
Source§impl OutputBufferOxide<'_>
impl OutputBufferOxide<'_>
Sourcefn put_bits(&mut self, bits: u32, len: u32)
fn put_bits(&mut self, bits: u32, len: u32)
Write bits to the bit buffer and flushes the bit buffer so any whole bytes are output to the underlying buffer.
Sourcefn put_bits_no_flush(&mut self, bits: u32, len: u32)
fn put_bits_no_flush(&mut self, bits: u32, len: u32)
Write the provided bits to the bit buffer without flushing anything. Does not check if there is actually space for it.
const fn save(&self) -> SavedOutputBufferOxide
fn load(&mut self, saved: SavedOutputBufferOxide)
Sourcefn pad_to_bytes(&mut self)
fn pad_to_bytes(&mut self)
Pad the bit buffer to a whole byte with zeroes and write that byte to the output buffer.
fn write_bytes(&mut self, bytes: &[u8])
Auto Trait Implementations§
impl<'a> Freeze for OutputBufferOxide<'a>
impl<'a> RefUnwindSafe for OutputBufferOxide<'a>
impl<'a> Send for OutputBufferOxide<'a>
impl<'a> Sync for OutputBufferOxide<'a>
impl<'a> Unpin for OutputBufferOxide<'a>
impl<'a> !UnwindSafe for OutputBufferOxide<'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