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