Skip to main content

qubit_codec/transcode/
transcode_converter.rs

1// =============================================================================
2//    Copyright (c) 2026 Haixing Hu.
3//
4//    SPDX-License-Identifier: Apache-2.0
5//
6//    Licensed under the Apache License, Version 2.0.
7// =============================================================================
8//! Semantic marker trait for buffered converters.
9
10use super::Transcoder;
11
12/// Converts encoded units of one representation into encoded units of another.
13///
14/// `TranscodeConverter` refines [`Transcoder`] for implementations whose
15/// input and output are both encoded unit streams. Any intermediate logical
16/// values are implementation details of the concrete converter.
17///
18/// The trait adds no methods. It exists to make generic bounds distinguish
19/// unit-to-unit conversion from value-to-unit encoding and unit-to-value
20/// decoding.
21///
22/// # Type Parameters
23///
24/// - `InputUnit`: Encoded input unit type accepted by the converter.
25/// - `OutputUnit`: Encoded output unit type produced by the converter.
26pub trait TranscodeConverter<InputUnit, OutputUnit>:
27    Transcoder<InputUnit, OutputUnit>
28{
29    //  empty
30}