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
//! Redaction policies: marker types and text transformations.
//!
//! This module provides:
//!
//! - **Policies** (`policies`): Zero-sized marker types like `Pii`, `Token`, `Email`
//! that identify what kind of sensitive data a field contains, along with the
//! [`RedactionPolicy`] trait and built-in implementations.
//!
//! - **Text policies** (`text`): The [`TextRedactionPolicy`] enum and its configuration
//! types (`KeepConfig`, `MaskConfig`, `EmailConfig`) for transforming strings.
//!
//! # Example
//!
//! ```rust
//! use redactable::{RedactionPolicy, TextRedactionPolicy, Token};
//!
//! // Built-in policies have default implementations
//! let policy = Token::policy();
//! assert_eq!(policy.apply_to("sk_live_abc123def456"), "****************f456");
//!
//! // Or create custom policies directly
//! let custom = TextRedactionPolicy::keep_last(4).with_mask_char('#');
//! assert_eq!(custom.apply_to("sensitive-data"), "##########data");
//! ```
// Re-export everything at the module level for convenience
pub use ;
pub use ;