qubit_fs/error/fs_effect_state.rs
1// =============================================================================
2// Copyright (c) 2026 Haixing Hu.
3//
4// SPDX-License-Identifier: Apache-2.0
5//
6// Licensed under the Apache License, Version 2.0.
7// =============================================================================
8//! Provider-neutral operation effect state.
9
10/// Strongest known effect that a failed filesystem operation had on storage.
11///
12/// # Examples
13///
14/// ```
15/// use qubit_fs::error::FsEffectState;
16///
17/// let unchanged = FsEffectState::Unchanged;
18/// assert!(matches!(unchanged, FsEffectState::Unchanged));
19/// ```
20#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
21#[non_exhaustive]
22#[must_use]
23pub enum FsEffectState {
24 /// The provider proved that the requested mutation did not occur.
25 Unchanged,
26 /// Some requested changes occurred, but the operation did not complete.
27 PartiallyApplied,
28 /// The requested namespace or data change occurred before a later failure.
29 Applied,
30 /// The provider cannot determine whether the requested change occurred.
31 Indeterminate,
32}