Skip to main content

BufferedDecoder

Trait BufferedDecoder 

Source
pub trait BufferedDecoder<Unit, Value>: BufferedTranscoder<Unit, Value> { }
Expand description

Decodes encoded units into logical values over caller-provided buffers.

BufferedDecoder refines BufferedTranscoder for implementations whose input is the encoded unit stream and whose output is the logical value stream. The trait adds no methods; it exists to make generic bounds distinguish decoding direction from encoding and unit-to-unit conversion.

The word “buffered” describes the caller-managed buffer and progress model. It does not require the implementor to own an internal buffer.

§Type Parameters

  • Unit: Encoded unit type accepted by the decoder.
  • Value: Logical value type produced by the decoder.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl<C> BufferedDecoder<<C as Codec>::Unit, <C as Codec>::Value> for CodecBufferedDecoder<C>
where C: Codec,