qubit_cas/error/cas_error_kind.rs
1/*******************************************************************************
2 *
3 * Copyright (c) 2025 - 2026 Haixing Hu.
4 *
5 * SPDX-License-Identifier: Apache-2.0
6 *
7 * Licensed under the Apache License, Version 2.0.
8 *
9 ******************************************************************************/
10//! Classified kinds for terminal CAS errors.
11
12/// Classified reason for a terminal CAS error.
13#[derive(Debug, Clone, Copy, PartialEq, Eq)]
14pub enum CasErrorKind {
15 /// The operation explicitly aborted.
16 Abort,
17 /// Retry limits were exhausted by compare-and-swap conflicts.
18 Conflict,
19 /// Retry limits were exhausted by retryable business failures.
20 RetryExhausted,
21 /// A timeout aborted the flow or exhausted retry limits.
22 AttemptTimeout,
23 /// The cumulative user operation elapsed-time budget expired.
24 MaxOperationElapsedExceeded,
25 /// The monotonic total retry-flow elapsed-time budget expired.
26 MaxTotalElapsedExceeded,
27}