pub struct KeywordMatcher { /* private fields */ }Expand description
Keyword matcher
Implementations§
Source§impl KeywordMatcher
impl KeywordMatcher
Sourcepub fn new(config: KeywordMatcherConfig) -> Self
pub fn new(config: KeywordMatcherConfig) -> Self
Create a new keyword matcher
Sourcepub fn from_keywords(keywords: Vec<String>) -> Self
pub fn from_keywords(keywords: Vec<String>) -> Self
Create from keyword list (legacy)
Sourcepub fn from_config(config: KeywordMatcherConfig) -> Self
pub fn from_config(config: KeywordMatcherConfig) -> Self
Create from config
Sourcepub fn classify(&self, text: &str) -> SensitivityLevel
pub fn classify(&self, text: &str) -> SensitivityLevel
Classify text based on keyword matches
Auto Trait Implementations§
impl Freeze for KeywordMatcher
impl RefUnwindSafe for KeywordMatcher
impl Send for KeywordMatcher
impl Sync for KeywordMatcher
impl Unpin for KeywordMatcher
impl UnsafeUnpin for KeywordMatcher
impl UnwindSafe for KeywordMatcher
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