pub struct LogRedactor { /* private fields */ }Expand description
Log redactor for automatic PII protection
Implementations§
Source§impl LogRedactor
impl LogRedactor
Sourcepub fn new(config: RedactionConfig) -> Self
pub fn new(config: RedactionConfig) -> Self
Create a new log redactor with custom configuration
Sourcepub fn add_custom_pattern(
&mut self,
name: &str,
pattern: &str,
) -> Result<(), Error>
pub fn add_custom_pattern( &mut self, name: &str, pattern: &str, ) -> Result<(), Error>
Add a custom redaction pattern
Sourcepub fn contains_sensitive_data(&self, input: &str) -> bool
pub fn contains_sensitive_data(&self, input: &str) -> bool
Check if a string contains sensitive data
Sourcepub fn detect_sensitive_types(&self, input: &str) -> Vec<RedactionPattern>
pub fn detect_sensitive_types(&self, input: &str) -> Vec<RedactionPattern>
Get list of detected sensitive data types
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LogRedactor
impl RefUnwindSafe for LogRedactor
impl Send for LogRedactor
impl Sync for LogRedactor
impl Unpin for LogRedactor
impl UnwindSafe for LogRedactor
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