Skip to main content

ByteStreamDecoder

Trait ByteStreamDecoder 

Source
pub trait ByteStreamDecoder: Send {
    // Required methods
    fn push(&mut self, chunk: &[u8]) -> Vec<u8> ;
    fn finish(&mut self) -> Vec<u8> ;
}
Expand description

Synchronous decoder for a chunked upstream byte stream.

Required Methods§

Source

fn push(&mut self, chunk: &[u8]) -> Vec<u8>

Feed one raw upstream chunk and return any decoded bytes.

Source

fn finish(&mut self) -> Vec<u8>

Flush trailing buffered state at end of stream.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§