Skip to main content

qubit_fs/
path_form.rs

1// =============================================================================
2//    Copyright (c) 2025 - 2026 Haixing Hu.
3//
4//    SPDX-License-Identifier: Apache-2.0
5//
6//    Licensed under the Apache License, Version 2.0.
7// =============================================================================
8// facade.
9//! Permitted path forms for filesystem property snapshots.
10
11/// Permitted absolute or relative form for paths accepted by a filesystem.
12///
13/// # Examples
14///
15/// ```rust
16/// use qubit_fs::path::{PathConstraints, PathForm};
17///
18/// let constraints = PathConstraints::absolute();
19/// assert_eq!(PathForm::Absolute, constraints.form());
20/// ```
21#[derive(Clone, Copy, Debug, Eq, PartialEq)]
22pub enum PathForm {
23    /// Only absolute paths are accepted.
24    Absolute,
25    /// Only relative paths are accepted.
26    Relative,
27    /// Both absolute and relative paths are accepted.
28    Either,
29}