qubit_codec/transcode/transcode_decoder.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 decoders.
9
10use super::Transcoder;
11
12/// Decodes encoded units into logical values over caller-provided buffers.
13///
14/// `TranscodeDecoder` refines [`Transcoder`] for implementations whose
15/// input is the encoded unit stream and whose output is the logical value
16/// stream. The trait adds no methods; it exists to make generic bounds
17/// distinguish decoding direction from encoding and unit-to-unit conversion.
18///
19/// The word "buffered" describes the caller-managed buffer and progress model.
20/// It does not require the implementor to own an internal buffer.
21///
22/// # Type Parameters
23///
24/// - `Unit`: Encoded unit type accepted by the decoder.
25/// - `Value`: Logical value type produced by the decoder.
26pub trait TranscodeDecoder<Unit, Value>: Transcoder<Unit, Value> {
27 // empty
28}