pub trait Encode {
// Required methods
fn encode(
&mut self,
input: &mut PartialBuffer<impl AsRef<[u8]>>,
output: &mut PartialBuffer<impl AsRef<[u8]> + AsMut<[u8]>>,
) -> Result<()>;
fn flush(
&mut self,
output: &mut PartialBuffer<impl AsRef<[u8]> + AsMut<[u8]>>,
) -> Result<bool>;
fn finish(
&mut self,
output: &mut PartialBuffer<impl AsRef<[u8]> + AsMut<[u8]>>,
) -> Result<bool>;
}
Required Methods§
fn encode( &mut self, input: &mut PartialBuffer<impl AsRef<[u8]>>, output: &mut PartialBuffer<impl AsRef<[u8]> + AsMut<[u8]>>, ) -> Result<()>
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§
impl Encode for BrotliEncoder
Available on crate feature
brotli
only.impl Encode for BzEncoder
Available on crate feature
bzip2
only.impl Encode for DeflateEncoder
Available on crate feature
deflate
only.impl Encode for FlateEncoder
Available on crate feature
flate2
only.impl Encode for GzipEncoder
Available on crate feature
gzip
only.impl Encode for Lz4Encoder
Available on crate feature
lz4
only.impl Encode for LzmaEncoder
Available on crate feature
lzma
only.impl Encode for Xz2Encoder
Available on crate feature
lzma
only.impl Encode for XzEncoder
Available on crate feature
xz
only.impl Encode for ZlibEncoder
Available on crate feature
zlib
only.impl Encode for ZstdEncoder
Available on crate feature
zstd
only.