pub struct PatternDetector { /* private fields */ }Expand description
The built-in detector: patterns with check-digit validation where the
format has one, so a random 16-digit order number is not a card and
2024-01-15 is not a phone.
Implementations§
Source§impl PatternDetector
impl PatternDetector
Sourcepub fn new(opts: &RedactionOptions) -> Result<Self, RedactionError>
pub fn new(opts: &RedactionOptions) -> Result<Self, RedactionError>
Build from the options: the pattern kinds in scope, the custom patterns compiled (an invalid one is the error), the deny terms as whole-word case-insensitive matches.
Trait Implementations§
Source§impl PiiDetector for PatternDetector
impl PiiDetector for PatternDetector
Auto Trait Implementations§
impl Freeze for PatternDetector
impl RefUnwindSafe for PatternDetector
impl Send for PatternDetector
impl Sync for PatternDetector
impl Unpin for PatternDetector
impl UnsafeUnpin for PatternDetector
impl UnwindSafe for PatternDetector
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