pub struct IpAddressRecognizer;Expand description
Recognizes IPv4 and IPv6 addresses.
§Examples
use cloakrs_core::{EntityType, Recognizer};
use cloakrs_patterns::IpAddressRecognizer;
let findings = IpAddressRecognizer.scan("client_ip=203.0.113.42");
assert_eq!(findings[0].entity_type, EntityType::IpAddress);
assert_eq!(findings[0].text, "203.0.113.42");Trait Implementations§
Source§impl Clone for IpAddressRecognizer
impl Clone for IpAddressRecognizer
Source§fn clone(&self) -> IpAddressRecognizer
fn clone(&self) -> IpAddressRecognizer
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 IpAddressRecognizer
impl Debug for IpAddressRecognizer
Source§impl Default for IpAddressRecognizer
impl Default for IpAddressRecognizer
Source§fn default() -> IpAddressRecognizer
fn default() -> IpAddressRecognizer
Returns the “default value” for a type. Read more
Source§impl Recognizer for IpAddressRecognizer
impl Recognizer for IpAddressRecognizer
Source§fn entity_type(&self) -> EntityType
fn entity_type(&self) -> EntityType
The entity type this recognizer detects.
Source§fn supported_locales(&self) -> &[Locale]
fn supported_locales(&self) -> &[Locale]
Locales this recognizer applies to. Empty means universal.
impl Copy for IpAddressRecognizer
Auto Trait Implementations§
impl Freeze for IpAddressRecognizer
impl RefUnwindSafe for IpAddressRecognizer
impl Send for IpAddressRecognizer
impl Sync for IpAddressRecognizer
impl Unpin for IpAddressRecognizer
impl UnsafeUnpin for IpAddressRecognizer
impl UnwindSafe for IpAddressRecognizer
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