qubit_redact/http/body_redaction_status.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//! Status of a bounded HTTP body redaction result.
9
10use super::BodyRedactionReason;
11
12/// Describes how an HTTP body was represented for diagnostics.
13#[must_use]
14#[non_exhaustive]
15#[derive(Debug, Clone, Copy, PartialEq, Eq)]
16pub enum BodyRedactionStatus {
17 /// The available bounded body bytes were empty.
18 Empty,
19 /// Structured parsing and configured field redaction succeeded.
20 Structured,
21 /// Policy explicitly allowed at least one value to remain visible.
22 PassedThrough,
23 /// The complete body representation was replaced fail-closed.
24 Redacted(
25 /// Reason a structured or visible representation was unsafe.
26 BodyRedactionReason,
27 ),
28 /// Non-UTF-8 binary data was represented only by a size summary.
29 Binary,
30}