Skip to main content

BufferedEncoder

Trait BufferedEncoder 

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

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

BufferedEncoder refines BufferedTranscoder for implementations whose input is the logical value stream and whose output is the encoded unit stream. The trait adds no methods; it exists to make generic bounds distinguish encoding direction from decoding 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

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

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl<C> BufferedEncoder<<C as Codec>::Value, <C as Codec>::Unit> for CodecBufferedEncoder<C>
where C: Codec,