Skip to main content

Compressor

Trait Compressor 

Source
pub trait Compressor: Send + Sync {
    // Required methods
    fn name(&self) -> &str;
    fn compress(&self, input: &str, budget: Option<usize>) -> String;
}
Expand description

A named text→text transform (e.g. a domain compression dictionary).

Required Methods§

Source

fn name(&self) -> &str

Stable registry name.

Source

fn compress(&self, input: &str, budget: Option<usize>) -> String

Compress input, optionally honoring a soft byte budget.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§