Skip to main content

qubit_redact/uri/
uri_component.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//! URI components that can carry sensitive data.
9
10/// A URI component whose redaction was controlled by the policy.
11#[must_use]
12#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
13pub enum UriComponent {
14    /// The userinfo username before the first raw colon.
15    Username,
16    /// The userinfo password after the first raw colon.
17    Password,
18    /// One or more query values classified by the core field policy.
19    Query,
20    /// The URI path when path redaction is enabled.
21    Path,
22    /// The URI fragment when fragment redaction is enabled.
23    Fragment,
24}