trait Buffer {
// Required methods
fn new(size: u8) -> Self;
fn reset(&mut self, min_size: u8);
fn clear(&mut self, min_size: u8);
fn buffer_code(&mut self, code: u16);
fn push_out(&mut self, out: &mut &mut [u8]) -> bool;
fn flush_out(&mut self, out: &mut &mut [u8]) -> bool;
fn buffer_pad(&mut self);
fn bump_code_size(&mut self);
fn max_code(&self) -> u16;
fn code_size(&self) -> u8;
}
Required Methods§
fn new(size: u8) -> Self
sourcefn buffer_code(&mut self, code: u16)
fn buffer_code(&mut self, code: u16)
Insert a code into the buffer.
sourcefn push_out(&mut self, out: &mut &mut [u8]) -> bool
fn push_out(&mut self, out: &mut &mut [u8]) -> bool
Push bytes if the buffer space is getting small.
sourcefn flush_out(&mut self, out: &mut &mut [u8]) -> bool
fn flush_out(&mut self, out: &mut &mut [u8]) -> bool
Flush all full bytes, returning if at least one more byte remains.
sourcefn buffer_pad(&mut self)
fn buffer_pad(&mut self)
Pad the buffer to a full byte.
sourcefn bump_code_size(&mut self)
fn bump_code_size(&mut self)
Increase the maximum code size.
Object Safety§
This trait is not object safe.