pub trait Compressor<B: ByteBufMut> {
type BufMut: ByteBufMut;
// Required method
fn compress<R, F>(buf: &mut B, f: F) -> Result<R>
where F: FnOnce(&mut Self::BufMut) -> Result<R>;
}Expand description
A trait for record compression algorithms.
Required Associated Types§
Sourcetype BufMut: ByteBufMut
type BufMut: ByteBufMut
Target buffer type for compression.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementors§
Source§impl<B: ByteBufMut> Compressor<B> for Gzip
Available on crate feature gzip only.
impl<B: ByteBufMut> Compressor<B> for Gzip
Available on crate feature
gzip only.Source§impl<B: ByteBufMut> Compressor<B> for Lz4
Available on crate feature lz4 only.
impl<B: ByteBufMut> Compressor<B> for Lz4
Available on crate feature
lz4 only.Source§impl<B: ByteBufMut> Compressor<B> for None
impl<B: ByteBufMut> Compressor<B> for None
Source§impl<B: ByteBufMut> Compressor<B> for Snappy
Available on crate feature snappy only.
impl<B: ByteBufMut> Compressor<B> for Snappy
Available on crate feature
snappy only.Source§impl<B: ByteBufMut> Compressor<B> for Zstd
Available on crate feature zstd only.
impl<B: ByteBufMut> Compressor<B> for Zstd
Available on crate feature
zstd only.