Trait rustls::compress::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§