Skip to main content

Compressor

Trait Compressor 

Source
pub trait Compressor: Send + Sync {
    // Required methods
    fn compress(&self, input: &str) -> CompressionResult;
    fn name(&self) -> &'static str;
}
Expand description

Trait for a single compression strategy.

Required Methods§

Source

fn compress(&self, input: &str) -> CompressionResult

Apply this compression strategy to the input text.

Source

fn name(&self) -> &'static str

Human-readable name for metrics/logging.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§