pub struct RedactionConfig {
pub regex_patterns: Vec<String>,
pub pointer_paths: Vec<String>,
pub replacement: String,
pub include_builtin_patterns: bool,
}Expand description
Configuration for constructing a RedactionEngine.
Call RedactionEngine::new to compile the patterns and build a
thread-safe engine instance.
Fields§
§regex_patterns: Vec<String>Raw regex pattern strings. Each is compiled once at engine construction.
pointer_paths: Vec<String>JSON pointer paths (RFC 6901) whose values are always replaced
regardless of content (e.g. "/password", "/credentials/secret").
replacement: StringThe string that replaces every redacted value. Defaults to "[REDACTED]".
include_builtin_patterns: boolWhen true, the engine includes built-in patterns for common sensitive
data: Bearer tokens, sk-*/key-* API keys, email addresses, credit
card numbers (Luhn-validated), US Social Security numbers, and public
(non-RFC 1918) IPv4 addresses.
Trait Implementations§
Source§impl Clone for RedactionConfig
impl Clone for RedactionConfig
Source§fn clone(&self) -> RedactionConfig
fn clone(&self) -> RedactionConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RedactionConfig
impl Debug for RedactionConfig
Auto Trait Implementations§
impl Freeze for RedactionConfig
impl RefUnwindSafe for RedactionConfig
impl Send for RedactionConfig
impl Sync for RedactionConfig
impl Unpin for RedactionConfig
impl UnsafeUnpin for RedactionConfig
impl UnwindSafe for RedactionConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more