[−][src]Struct lrl_test_compiler::bits::BitWriter
BitWriter is a data structure for appending bit sized data to a sequence of bytes
Fields
data: Vec<u8>The data in the BitWriter
cursor: usizeThe current position in the BitWriter
Implementations
impl BitWriter[src]
pub fn new() -> Self[src]
Create a new empty BitWriter
pub fn append<D>(&mut self, data: D) where
D: BitSource, [src]
D: BitSource,
Append the whole bit source to this BitWriter
pub fn append_tail<D>(&mut self, data: D, len: u8) where
D: BitSource, [src]
D: BitSource,
Append the tail (least significant bits) of a bit source to this BitWriter
pub fn append_range<D>(&mut self, data: D, offset: u8, len: u8) where
D: BitSource, [src]
D: BitSource,
Appends the bits that make up the selected range of the data to the bit buffer.
fn room(&self) -> u8[src]
How much room is left in the current cell
fn update(&mut self, overlay: u8, append: Vec<u8>, increment: u8)[src]
Applies the overlay to the current cell, adds new cells and increments the cursor
pub fn as_bytes(&self) -> &[u8][src]
Read this BitWriter's byte contents
pub fn len(&self) -> usize[src]
See how many bits have been appended
Trait Implementations
impl Clone for BitWriter[src]
impl Debug for BitWriter[src]
impl Eq for BitWriter[src]
impl From<BitWriter> for BitReader[src]
impl PartialEq<BitWriter> for BitWriter[src]
impl StructuralEq for BitWriter[src]
impl StructuralPartialEq for BitWriter[src]
Auto Trait Implementations
impl RefUnwindSafe for BitWriter
impl Send for BitWriter
impl Sync for BitWriter
impl Unpin for BitWriter
impl UnwindSafe for BitWriter
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<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized, [src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
pub fn equivalent(&self, key: &K) -> bool[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<Src, Dst> LosslessTryInto<Dst> for Src where
Dst: LosslessTryFrom<Src>, [src]
Dst: LosslessTryFrom<Src>,
pub fn lossless_try_into(self) -> Option<Dst>[src]
impl<Src, Dst> LossyInto<Dst> for Src where
Dst: LossyFrom<Src>, [src]
Dst: LossyFrom<Src>,
pub fn lossy_into(self) -> Dst[src]
impl<T> Same<T> for T[src]
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut T)[src]
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>, [src]
V: MultiLane<T>,