[−][src]Struct bitwise::BitWriter
Writer to bitwise writing to Write
Fields
pad_zero: bool
Implementations
impl<W: Write> BitWriter<W>
[src]
pub fn new(inner: W, pad_zero: bool) -> Self
[src]
Create a new BitWriter from a Write Trait with default capacity of 1024 Bytes
pub fn with_capacity(capacity: usize, inner: W, pad_zero: bool) -> Self
[src]
Create a new BitWriter with a capacity (in Bytes)
pub fn write(&mut self, bit: Bit) -> Result<()>
[src]
Writes a single Bit into the internal Buffer If internal buffer is full -> Call internal write
pub fn write_bits(&mut self, bits: &Vec<Bit>) -> Result<()>
[src]
Writes a vector of Bits into the internal Buffer If internal buffer is full -> Call internal write
pub fn write_buf(&mut self) -> Result<()>
[src]
Write the internal Buffer and Pad with Zero? If needed
pub fn discard_non_byte(&mut self)
[src]
Removes excess bits that do not form a byte
pub fn is_empty(&self) -> bool
[src]
Returns true if the Buffer is empty
pub fn buf_len(&self) -> usize
[src]
Returns the length of the internal buffer
Trait Implementations
Auto Trait Implementations
impl<W> RefUnwindSafe for BitWriter<W> where
W: RefUnwindSafe,
[src]
W: RefUnwindSafe,
impl<W> Send for BitWriter<W> where
W: Send,
[src]
W: Send,
impl<W> Sync for BitWriter<W> where
W: Sync,
[src]
W: Sync,
impl<W> Unpin for BitWriter<W> where
W: Unpin,
[src]
W: Unpin,
impl<W> UnwindSafe for BitWriter<W> where
W: UnwindSafe,
[src]
W: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,