Trait ProcessBuffer

Source
pub trait ProcessBuffer {
    // Required method
    fn process_buffer(
        &mut self,
        input: &[u8],
        input_complete: bool,
        writer: &mut impl Write,
        max_output_write: usize,
    ) -> Result<bool>;

    // Provided methods
    fn copy_to_end(
        &mut self,
        input: &mut impl BufRead,
        output: &mut impl Write,
    ) -> Result<()> { ... }
    fn copy_to_end_size(
        &mut self,
        input: &mut impl BufRead,
        output: &mut impl Write,
        read_chunk_size: usize,
        write_chunk_size: usize,
    ) -> Result<()> { ... }
    fn stats(&self) -> PreflateStats { ... }
}
Expand description

Processes an input buffer and writes the output to a writer

Required Methods§

Source

fn process_buffer( &mut self, input: &[u8], input_complete: bool, writer: &mut impl Write, max_output_write: usize, ) -> Result<bool>

Provided Methods§

Source

fn copy_to_end( &mut self, input: &mut impl BufRead, output: &mut impl Write, ) -> Result<()>

Reads everything from input and writes it to the output. Wraps calls to process buffer

Source

fn copy_to_end_size( &mut self, input: &mut impl BufRead, output: &mut impl Write, read_chunk_size: usize, write_chunk_size: usize, ) -> Result<()>

Reads everything from input and writes it to the output. Wraps calls to process buffer

Source

fn stats(&self) -> PreflateStats

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.

Implementors§