Skip to main content

qubit_progress/internal/
operation_lifecycle.rs

1// =============================================================================
2//    Copyright (c) 2025 - 2026 Haixing Hu.
3//
4//    SPDX-License-Identifier: Apache-2.0
5//
6//    Licensed under the Apache License, Version 2.0.
7// =============================================================================
8//! Lifecycle state values for one progress operation.
9// qubit-style: allow source-test-pair
10
11/// Lifecycle state visible to metric transition errors.
12#[derive(Clone, Copy, Debug, Eq, PartialEq)]
13#[repr(u8)]
14pub enum OperationLifecycle {
15    /// Metric transitions may enter the operation.
16    Open = 0,
17    /// New transitions are rejected while terminal validation runs.
18    Finishing = 1,
19    /// The operation can no longer be mutated.
20    Closed = 2,
21}