pub struct CategoryRule {
pub name: String,
pub matcher: Box<dyn Fn(&str) -> bool + Send + Sync>,
pub category: StringCategory,
pub priority: i32,
}
Expand description
Rule for categorizing strings
Fields§
§name: String
Name of the rule
matcher: Box<dyn Fn(&str) -> bool + Send + Sync>
Function that determines if a string matches this rule
category: StringCategory
Category to assign if the rule matches
priority: i32
Priority (higher priority rules are evaluated first)
Auto Trait Implementations§
impl Freeze for CategoryRule
impl !RefUnwindSafe for CategoryRule
impl Send for CategoryRule
impl Sync for CategoryRule
impl Unpin for CategoryRule
impl !UnwindSafe for CategoryRule
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