pub struct PiiManager { /* private fields */ }
Expand description
PII detection and masking manager
Implementations§
Source§impl PiiManager
impl PiiManager
pub fn new(config: PiiConfig) -> Result<Self>
Sourcepub fn detect_pii(&self, content: &str) -> PiiDetectionResult
pub fn detect_pii(&self, content: &str) -> PiiDetectionResult
Detect PII in text content
Sourcepub fn mask_for_logging(&self, content: &str) -> String
pub fn mask_for_logging(&self, content: &str) -> String
Mask sensitive content for logging
Sourcepub fn mask_for_response(&self, content: &str) -> String
pub fn mask_for_response(&self, content: &str) -> String
Mask sensitive content for API responses
Sourcepub fn should_anonymize(&self, content: &str) -> bool
pub fn should_anonymize(&self, content: &str) -> bool
Check if content should be anonymized for storage
Sourcepub fn anonymize_for_storage(&self, content: &str) -> String
pub fn anonymize_for_storage(&self, content: &str) -> String
Anonymize content for storage
pub fn is_enabled(&self) -> bool
pub fn get_pattern_count(&self) -> usize
Auto Trait Implementations§
impl Freeze for PiiManager
impl RefUnwindSafe for PiiManager
impl Send for PiiManager
impl Sync for PiiManager
impl Unpin for PiiManager
impl UnwindSafe for PiiManager
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more