pub trait Compressor:
Send
+ Sync
+ Debug {
// Required methods
fn compress(&self, data: &[u8]) -> CompressionResult<Vec<u8>>;
fn decompress(&self, data: &[u8]) -> CompressionResult<Vec<u8>>;
}Expand description
Compressor trait for pluggable compression implementations
Implementations must support transparent compression and decompression with configurable levels.
Required Methods§
Sourcefn decompress(&self, data: &[u8]) -> CompressionResult<Vec<u8>>
fn decompress(&self, data: &[u8]) -> CompressionResult<Vec<u8>>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".