pub struct BitWriter<W>where
W: Write,{
pub endbit: i32,
pub total_bits: usize,
pub writer: W,
pub cache: CursorVecU8,
}Expand description
- BitWriter: write vorbis data bit by bit
Fields§
§endbit: i32- Currently ends at which bit in the last byte
total_bits: usize- How many bits did we wrote in total
writer: W- The sink
cache: CursorVecU8- The cache that holds data to be flushed
Implementations§
Source§impl<W> BitWriter<W>where
W: Write,
impl<W> BitWriter<W>where
W: Write,
Source§impl BitWriter<CursorVecU8>
impl BitWriter<CursorVecU8>
Sourcepub fn into_bytes(self) -> Vec<u8> ⓘ
pub fn into_bytes(self) -> Vec<u8> ⓘ
- Get the inner byte array and consumes the writer.
Trait Implementations§
Auto Trait Implementations§
impl<W> Freeze for BitWriter<W>where
W: Freeze,
impl<W> RefUnwindSafe for BitWriter<W>where
W: RefUnwindSafe,
impl<W> Send for BitWriter<W>where
W: Send,
impl<W> Sync for BitWriter<W>where
W: Sync,
impl<W> Unpin for BitWriter<W>where
W: Unpin,
impl<W> UnwindSafe for BitWriter<W>where
W: UnwindSafe,
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