pub struct BitWriterLsb { /* private fields */ }Expand description
LSB-first bit writer — inverse of BitReaderLsb.
Implementations§
Source§impl BitWriterLsb
impl BitWriterLsb
pub fn new() -> Self
pub fn with_capacity(cap: usize) -> Self
pub fn bit_position(&self) -> u64
pub fn write_u32(&mut self, value: u32, n: u32)
pub fn write_u64(&mut self, value: u64, n: u32)
pub fn write_bit(&mut self, bit: bool)
Sourcepub fn align_to_byte(&mut self)
pub fn align_to_byte(&mut self)
Pad to the next byte boundary with zero bits.
pub fn finish(self) -> Vec<u8> ⓘ
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BitWriterLsb
impl RefUnwindSafe for BitWriterLsb
impl Send for BitWriterLsb
impl Sync for BitWriterLsb
impl Unpin for BitWriterLsb
impl UnsafeUnpin for BitWriterLsb
impl UnwindSafe for BitWriterLsb
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