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§
fn new() -> Self
fn compress<W: Write + Seek, R: Read>( &self, writer: &mut W, reader: &mut R, ) -> Result<ByteCount>
Provided Methods§
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.