pub trait Recognizer: Send + Sync {
// Required methods
fn id(&self) -> &str;
fn supported_class(&self) -> &PiiClass;
fn detect(&self, input: &str, ctx: &DetectContext<'_>) -> Vec<Candidate>;
fn token_family(&self) -> &str;
// Provided method
fn locales(&self) -> &[LocaleTag] { ... }
}Expand description
Shared recognizer contract for locale-aware PII candidates.
Required Methods§
Sourcefn supported_class(&self) -> &PiiClass
fn supported_class(&self) -> &PiiClass
PII class supported by this recognizer.
Sourcefn detect(&self, input: &str, ctx: &DetectContext<'_>) -> Vec<Candidate>
fn detect(&self, input: &str, ctx: &DetectContext<'_>) -> Vec<Candidate>
Detects PII candidates in the supplied input and context.
Sourcefn token_family(&self) -> &str
fn token_family(&self) -> &str
Token family used for candidate token emission.