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
38
39
40
41
42
43
//! Application layer: Redaction machinery.
//!
//! This module provides the infrastructure for applying redaction:
//!
//! - [`RedactableMapper`]: Internal trait for mapping values during traversal
//! - [`PolicyApplicable`]: Types that can have policies applied recursively
//! - [`redact`]: The entry point function for redacting a value
//! - [`ScalarRedaction`]: Helper trait for scalar default values
//!
//! ## How `PolicyApplicable` Works
//!
//! For a field like:
//! ```ignore
//! #[sensitive(Token)]
//! api_keys: Option<Vec<String>>
//! ```
//!
//! The generated code calls:
//! ```ignore
//! PolicyApplicable::apply_policy::<Token, _>(api_keys, mapper)
//! ```
//!
//! At runtime, this recursively descends:
//! 1. `Option<Vec<String>>` → calls `.map(|v| v.apply_policy::<Token, _>(mapper))`
//! 2. `Vec<String>` → calls `.into_iter().map(|v| v.apply_policy::<Token, _>(mapper)).collect()`
//! 3. `String` → calls `mapper.map_sensitive::<_, Token>(self)`
//!
//! The recursion handles any nesting depth automatically!
pub use ;
pub use PolicyMapOutput;