qubit-codec 0.16.1

Core codec traits and buffer conversion primitives for Rust
Documentation
// =============================================================================
//    Copyright (c) 2026 Haixing Hu.
//
//    SPDX-License-Identifier: Apache-2.0
//
//    Licensed under the Apache License, Version 2.0.
// =============================================================================
//! Result type for one asynchronous decode operation.

use crate::TranscodeProgress;

/// Result of one cancellation-safe asynchronous decode operation.
///
/// # Examples
///
/// ```
/// use qubit_codec::AsyncTranscodeDecodeStep;
///
/// let step = AsyncTranscodeDecodeStep::EndOfInput;
/// assert!(matches!(step, AsyncTranscodeDecodeStep::EndOfInput));
/// ```
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
#[must_use]
pub enum AsyncTranscodeDecodeStep {
    /// The wrapped input reached EOF with no unread units.
    EndOfInput,
    /// The decoder consumed input or initialized output without another await.
    Progress(
        /// Consumed and written counts and the decoder stop status.
        TranscodeProgress,
    ),
}