qubit_cas/error/cas_attempt_failure_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//! Lightweight kind of attempt-level CAS failure.
11
12/// Lightweight kind of attempt-level CAS failure.
13#[derive(Debug, Clone, Copy, PartialEq, Eq)]
14pub enum CasAttemptFailureKind {
15 /// Compare-and-swap failed because another writer changed the state first.
16 Conflict,
17 /// Business logic requested another attempt.
18 Retry,
19 /// Business logic aborted the flow.
20 Abort,
21 /// An async attempt exceeded its timeout.
22 Timeout,
23}