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§

source

fn reinit(&mut self) -> Result<()>

Reinitializes this decoder ready to decode a new member/frame of data.

source

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

source

fn flush( &mut self, output: &mut PartialBuffer<impl AsRef<[u8]> + AsMut<[u8]>>, ) -> Result<bool>

Returns whether the internal buffers are flushed

source

fn finish( &mut self, output: &mut PartialBuffer<impl AsRef<[u8]> + AsMut<[u8]>>, ) -> Result<bool>

Returns whether the internal buffers are flushed

Object Safety§

This trait is not object safe.

Implementors§