pub(crate) struct OutputBitStream {
data: Vec<u8>,
sub_index: u32,
branch_factor: BranchFactor,
}
Fields§
§data: Vec<u8>
§sub_index: u32
§branch_factor: BranchFactor
Implementations§
Source§impl OutputBitStream
impl OutputBitStream
pub(crate) const MAX_HEIGHT: u8 = 31u8
pub(crate) fn new(branch_factor: BranchFactor, height: u8) -> OutputBitStream
pub fn into_bytes(self) -> Vec<u8> ⓘ
Sourcepub fn write_node(&mut self, bits: u32)
pub fn write_node(&mut self, bits: u32)
Writes a single node worth of bits to the stream.
branch_factor
controls the node size.
Sourcefn write_header(&mut self, height: u8)
fn write_header(&mut self, height: u8)
Writes the header byte for a sparse bit set.
See: https://w3c.github.io/IFT/Overview.html#sparse-bit-set-decoding
Auto Trait Implementations§
impl Freeze for OutputBitStream
impl RefUnwindSafe for OutputBitStream
impl Send for OutputBitStream
impl Sync for OutputBitStream
impl Unpin for OutputBitStream
impl UnwindSafe for OutputBitStream
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