Trait async_compression::codec::Decode
source · 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
Object Safety§
This trait is not object safe.