qubit_redact/output/redaction_completion.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//! Completion state shared by redaction operations.
9
10/// Describes whether a redaction operation produced all required safe output.
11///
12/// # Examples
13///
14/// ```
15/// use qubit_redact::{RedactionCompletion, Redactor};
16///
17/// let output = Redactor::standard().redact_field("password", "raw-secret");
18/// assert_eq!(output.summary().completion(), RedactionCompletion::Complete);
19/// ```
20#[must_use]
21#[derive(Debug, Clone, Copy, PartialEq, Eq)]
22pub enum RedactionCompletion {
23 /// All input was processed and its complete safe output fit the budget.
24 ///
25 /// An ordinary sensitivity mask is a complete result, not truncation.
26 Complete,
27 /// Input or output was omitted, but non-empty safe substitute text was
28 /// emitted.
29 Truncated,
30 /// The shared output budget could not retain a complete safe replacement.
31 Exhausted,
32}