Struct BitmaskMatcher
pub struct BitmaskMatcher { /* private fields */ }Expand description
Bitmask-based pattern matcher for high-performance matching
Implementations§
§impl BitmaskMatcher
impl BitmaskMatcher
pub fn new() -> BitmaskMatcher
pub fn new() -> BitmaskMatcher
Create a new bitmask matcher
pub fn add_pattern(&mut self, pattern: &str) -> bool
pub fn add_pattern(&mut self, pattern: &str) -> bool
Add a pattern to the matcher Returns true if the pattern was successfully added (bitmask-compatible)
pub fn remove_pattern(&mut self, pattern: &str) -> bool
pub fn remove_pattern(&mut self, pattern: &str) -> bool
Remove a pattern from the matcher
pub fn find_matching_patterns(&self, topic: &str) -> Vec<&str>
pub fn find_matching_patterns(&self, topic: &str) -> Vec<&str>
Find all patterns that match a given topic
pub fn pattern_count(&self) -> usize
pub fn pattern_count(&self) -> usize
Get the number of registered patterns
pub fn clear(&mut self)
pub fn clear(&mut self)
Clear all patterns
pub fn statistics(&self) -> BitmaskMatcherStatistics
pub fn statistics(&self) -> BitmaskMatcherStatistics
Get statistics about the matcher
Trait Implementations§
§impl Debug for BitmaskMatcher
impl Debug for BitmaskMatcher
§impl Default for BitmaskMatcher
impl Default for BitmaskMatcher
§fn default() -> BitmaskMatcher
fn default() -> BitmaskMatcher
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for BitmaskMatcher
impl RefUnwindSafe for BitmaskMatcher
impl Send for BitmaskMatcher
impl Sync for BitmaskMatcher
impl Unpin for BitmaskMatcher
impl UnwindSafe for BitmaskMatcher
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