pub struct PatternIndex { /* private fields */ }Expand description
In-memory index for fast pattern lookup.
Implementations§
Source§impl PatternIndex
impl PatternIndex
pub fn new() -> Self
pub fn add(&mut self, pattern: &Pattern)
pub fn remove(&mut self, pattern: &Pattern)
pub fn find_by_name(&self, name: &str) -> Vec<String>
pub fn find_by_domain(&self, domain: &str) -> Vec<String>
pub fn find_by_language(&self, language: &str) -> Vec<String>
pub fn find_by_tag(&self, tag: &str) -> Vec<String>
pub fn find_by_return_type(&self, return_type: &str) -> Vec<String>
pub fn search(&self, query: &str) -> HashSet<String>
pub fn total_indexed(&self) -> usize
pub fn clear(&mut self)
Trait Implementations§
Source§impl Debug for PatternIndex
impl Debug for PatternIndex
Source§impl Default for PatternIndex
impl Default for PatternIndex
Source§fn default() -> PatternIndex
fn default() -> PatternIndex
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for PatternIndex
impl RefUnwindSafe for PatternIndex
impl Send for PatternIndex
impl Sync for PatternIndex
impl Unpin for PatternIndex
impl UnsafeUnpin for PatternIndex
impl UnwindSafe for PatternIndex
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