1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// =============================================================================
// Copyright (c) 2026 Haixing Hu.
//
// SPDX-License-Identifier: Apache-2.0
//
// Licensed under the Apache License, Version 2.0.
// =============================================================================
//! Opaque capabilities for unpublished batch items.
/// Opaque reference to one unpublished item in a
/// [`crate::DiagnosticRedactionBatch`].
///
/// # Examples
///
/// ```
/// use qubit_redact::Redactor;
///
/// let mut batch = Redactor::standard().diagnostic_batch();
/// let handle = batch.redact_field("id", "42");
/// let diagnostics = batch.finish_with_marker("<incomplete>");
/// assert_eq!(diagnostics.text(handle).as_str(), "42");
/// ```
///
/// ```compile_fail
/// use qubit_redact::Redactor;
///
/// let mut batch = Redactor::strict().diagnostic_batch();
/// let handle = batch.redact_field("password", "raw-secret");
/// let _ = format!("{handle}");
/// ```