Compressor

Trait Compressor 

Source
pub trait Compressor {
    // Required methods
    fn new() -> Self;
    fn compress<W: Write + Seek, R: Read>(
        &self,
        writer: &mut W,
        reader: &mut R,
    ) -> Result<ByteCount>;

    // Provided method
    fn to_vec<V: Compress>(&self, data: V) -> Result<Vec<u8>> { ... }
}

Required Methods§

Source

fn new() -> Self

Source

fn compress<W: Write + Seek, R: Read>( &self, writer: &mut W, reader: &mut R, ) -> Result<ByteCount>

Provided Methods§

Source

fn to_vec<V: Compress>(&self, data: V) -> Result<Vec<u8>>

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§