pub trait CertCompressor:
Debug
+ Send
+ Sync {
// Required methods
fn compress(
&self,
input: Vec<u8>,
level: CompressionLevel,
) -> Result<Vec<u8>, CompressionFailed>;
fn algorithm(&self) -> CertificateCompressionAlgorithm;
}展开描述
可用的证书压缩算法
必需方法§
Sourcefn compress(
&self,
input: Vec<u8>,
level: CompressionLevel,
) -> Result<Vec<u8>, CompressionFailed>
fn compress( &self, input: Vec<u8>, level: CompressionLevel, ) -> Result<Vec<u8>, CompressionFailed>
Compress input, returning 结果.
input is 已消耗 by 此函数 so (if 底层 implementation
supports it) the compression can be performed in-place.
level 是 hint as 到 how much effort 到 expend on the compression.
Err(CompressionFailed) may be returned 用于 any reason.
Sourcefn algorithm(&self) -> CertificateCompressionAlgorithm
fn algorithm(&self) -> CertificateCompressionAlgorithm
此压缩器处理的算法