rustls::compress

Trait CertCompressor

Source
pub trait CertCompressor:
    Debug
    + Send
    + Sync {
    // Required methods
    fn compress(
        &self,
        input: Vec<u8>,
        level: CompressionLevel,
    ) -> Result<Vec<u8>, CompressionFailed>;
    fn algorithm(&self) -> CertificateCompressionAlgorithm;
}
Expand description

An available certificate compression algorithm.

Required Methods§

Source

fn compress( &self, input: Vec<u8>, level: CompressionLevel, ) -> Result<Vec<u8>, CompressionFailed>

Compress input, returning the result.

input is consumed by this function so (if the underlying implementation supports it) the compression can be performed in-place.

level is a hint as to how much effort to expend on the compression.

Err(CompressionFailed) may be returned for any reason.

Source

fn algorithm(&self) -> CertificateCompressionAlgorithm

Which algorithm this compressor handles.

Implementors§