Skip to main content

qubit_fs/path/
path_semantics.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//! Path semantics exposed by filesystem implementations.
9
10/// Provider path semantics.
11///
12/// # Examples
13///
14/// ```rust
15/// use qubit_fs::path::PathSemantics;
16///
17/// assert_eq!(PathSemantics::Hierarchical, PathSemantics::default());
18/// ```
19#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
20pub enum PathSemantics {
21    /// Hierarchical directory semantics.
22    Hierarchical,
23    /// Object-key or prefix semantics.
24    ObjectKey,
25    /// Provider-specific semantics.
26    ProviderSpecific,
27}
28
29impl Default for PathSemantics {
30    /// Uses hierarchical path semantics by default.
31    #[inline]
32    fn default() -> Self {
33        Self::Hierarchical
34    }
35}