pub struct RedactionOptions {
pub kinds: Vec<PiiKind>,
pub replacement: Replacement,
pub custom_patterns: Vec<CustomPattern>,
pub deny_terms: Vec<String>,
pub allow_terms: Vec<String>,
pub ner_min_score: f32,
pub images: ImageRedaction,
pub return_mapping: bool,
}Expand description
The pass’s settings. Default = every kind, labels, no custom patterns,
images dropped, no mapping.
Fields§
§kinds: Vec<PiiKind>Which kinds to redact; empty = every kind the available detectors find (the pattern kinds, and the NER kinds when a model runs).
replacement: Replacement§custom_patterns: Vec<CustomPattern>Extra patterns, redacted as PiiKind::Custom under their own label.
deny_terms: Vec<String>Literal terms (case-insensitive, whole words) always redacted, as
[REDACTED] — a project code name, a client’s name the NER misses.
allow_terms: Vec<String>Literal terms (case-insensitive) never redacted even when a detector
flags them — support@example.com, the company’s own name.
ner_min_score: f32The NER detector’s minimum confidence for a span (0–1; 0.85 by default — a lone common word in a table header reads as a location at ~0.8, a real name at 0.99+).
images: ImageRedaction§return_mapping: boolKeep the original → placeholder pairs in the report. Off by default
— the report then carries counts only and can be logged or returned
over HTTP without leaking what was removed.