pub trait Decode {
// Required methods
fn reinit(&mut self) -> Result<()>;
fn decode(
&mut self,
input: &mut PartialBuffer<impl AsRef<[u8]>>,
output: &mut PartialBuffer<impl AsRef<[u8]> + AsMut<[u8]>>,
) -> Result<bool>;
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§
Sourcefn reinit(&mut self) -> Result<()>
fn reinit(&mut self) -> Result<()>
Reinitializes this decoder ready to decode a new member/frame of data.
Sourcefn decode(
&mut self,
input: &mut PartialBuffer<impl AsRef<[u8]>>,
output: &mut PartialBuffer<impl AsRef<[u8]> + AsMut<[u8]>>,
) -> Result<bool>
fn decode( &mut self, input: &mut PartialBuffer<impl AsRef<[u8]>>, output: &mut PartialBuffer<impl AsRef<[u8]> + AsMut<[u8]>>, ) -> Result<bool>
Returns whether the end of the stream has been read
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 Decode for BrotliDecoder
Available on crate feature
brotli
only.impl Decode for BzDecoder
Available on crate feature
bzip2
only.impl Decode for Deflate64Decoder
Available on crate feature
deflate64
only.impl Decode for DeflateDecoder
Available on crate feature
deflate
only.impl Decode for FlateDecoder
Available on crate feature
flate2
only.impl Decode for GzipDecoder
Available on crate feature
gzip
only.impl Decode for Lz4Decoder
Available on crate feature
lz4
only.impl Decode for LzmaDecoder
Available on crate feature
lzma
only.impl Decode for Xz2Decoder
Available on crate feature
lzma
only.impl Decode for XzDecoder
Available on crate feature
xz
only.impl Decode for ZlibDecoder
Available on crate feature
zlib
only.impl Decode for ZstdDecoder
Available on crate feature
zstd
only.