Skip to main content

TranscodeConverter

Trait TranscodeConverter 

Source
pub trait TranscodeConverter<InputUnit, OutputUnit>: Transcoder<InputUnit, OutputUnit> { }
Expand description

Converts encoded units of one representation into encoded units of another.

TranscodeConverter refines Transcoder for implementations whose input and output are both encoded unit streams. Any intermediate logical values are implementation details of the concrete converter.

The trait adds no methods. It exists to make generic bounds distinguish unit-to-unit conversion from value-to-unit encoding and unit-to-value decoding.

§Type Parameters

  • InputUnit: Encoded input unit type accepted by the converter.
  • OutputUnit: Encoded output unit type produced by the converter.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl<D, E> TranscodeConverter<<D as Codec>::Unit, <E as Codec>::Unit> for CodecTranscodeConverter<D, E>
where D: Codec, E: Codec<Value = D::Value>, D::Value: Default,