pub struct DefaultCategorizer { /* private fields */ }Expand description
Default heuristic categorizer.
Implementations§
Trait Implementations§
Source§impl Categorizer for DefaultCategorizer
impl Categorizer for DefaultCategorizer
Source§fn categorize(&self, value: &str) -> Vec<StringCategory>
fn categorize(&self, value: &str) -> Vec<StringCategory>
Categorize a string in deterministic rule order.
Source§fn add_rule(&mut self, rule: CategoryRule) -> AnalysisResult<()>
fn add_rule(&mut self, rule: CategoryRule) -> AnalysisResult<()>
Validate and add a uniquely named rule.
Source§fn remove_rule(&mut self, name: &str) -> AnalysisResult<()>
fn remove_rule(&mut self, name: &str) -> AnalysisResult<()>
Remove an existing rule by name.
Source§fn get_categories(&self) -> Vec<StringCategory>
fn get_categories(&self) -> Vec<StringCategory>
Return distinct categories in deterministic rule order.
Auto Trait Implementations§
impl !RefUnwindSafe for DefaultCategorizer
impl !UnwindSafe for DefaultCategorizer
impl Freeze for DefaultCategorizer
impl Send for DefaultCategorizer
impl Sync for DefaultCategorizer
impl Unpin for DefaultCategorizer
impl UnsafeUnpin for DefaultCategorizer
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