Skip to main content

qubit_fs/metadata/
file_system_capability_support.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//! Support status for one filesystem capability.
9
10/// Describes how a filesystem provider can satisfy a capability.
11///
12/// # Examples
13///
14/// ```rust
15/// use qubit_fs::metadata::FileSystemCapabilitySupport;
16///
17/// let support = FileSystemCapabilitySupport::Conditional;
18/// let can_attempt = match support {
19///     FileSystemCapabilitySupport::Unsupported => false,
20///     FileSystemCapabilitySupport::Conditional | FileSystemCapabilitySupport::Guaranteed => true,
21/// };
22/// assert!(can_attempt);
23/// ```
24#[derive(Clone, Copy, Debug, Eq, PartialEq)]
25#[must_use]
26pub enum FileSystemCapabilitySupport {
27    /// The provider does not implement the capability.
28    Unsupported,
29    /// The provider can attempt the capability, but support depends on the
30    /// request, authority, mount, or runtime state.
31    Conditional,
32    /// The provider supports the capability for every valid request in its
33    /// advertised filesystem scope.
34    Guaranteed,
35}