Skip to main content

qubit_cas/error/
cas_attempt_failure_kind.rs

1/*******************************************************************************
2 *
3 *    Copyright (c) 2025 - 2026.
4 *    Haixing Hu, Qubit Co. Ltd.
5 *
6 *    All rights reserved.
7 *
8 ******************************************************************************/
9//! Lightweight kind of attempt-level CAS failure.
10
11/// Lightweight kind of attempt-level CAS failure.
12#[derive(Debug, Clone, Copy, PartialEq, Eq)]
13pub enum CasAttemptFailureKind {
14    /// Compare-and-swap failed because another writer changed the state first.
15    Conflict,
16    /// Business logic requested another attempt.
17    Retry,
18    /// Business logic aborted the flow.
19    Abort,
20    /// An async attempt exceeded its timeout.
21    Timeout,
22}