Skip to main content

qubit_cas/error/
cas_error_kind.rs

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