Skip to main content

qubit_fs/read/
prefix_read_termination.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
9//! Completion state for bounded prefix reads.
10
11/// Explains why a bounded prefix read stopped.
12#[derive(Clone, Copy, Debug, Eq, PartialEq)]
13#[non_exhaustive]
14pub enum PrefixReadTermination {
15    /// The requested prefix limit was reached without probing beyond it.
16    LimitReached,
17    /// The opened stream returned EOF before the requested prefix limit.
18    StreamEnded,
19}