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