Skip to main content

ContentCompressor

Trait ContentCompressor 

Source
pub trait ContentCompressor:
    Debug
    + Send
    + Sync {
    // Required method
    fn compress(&self, content: &str, target_bytes: usize) -> String;
}
Expand description

Pluggable strategy for compressing a single content string.

Required Methods§

Source

fn compress(&self, content: &str, target_bytes: usize) -> String

Compress content so its JSON-serialised form fits within target_bytes.

Implementors§