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.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.