pub struct PatternStore { /* private fields */ }Expand description
Pattern storage engine.
Implementations§
Source§impl PatternStore
impl PatternStore
pub fn new() -> Self
pub fn with_data_dir(data_dir: &Path) -> EvolveResult<Self>
pub fn save(&mut self, pattern: &Pattern) -> EvolveResult<()>
pub fn get(&self, id: &str) -> EvolveResult<&Pattern>
pub fn get_mut(&mut self, id: &str) -> EvolveResult<&mut Pattern>
pub fn delete(&mut self, id: &str) -> EvolveResult<Pattern>
pub fn list(&self) -> Vec<&Pattern>
pub fn list_by_domain(&self, domain: &str) -> Vec<&Pattern>
pub fn list_by_language(&self, language: &str) -> Vec<&Pattern>
pub fn search(&self, query: &str) -> Vec<&Pattern>
pub fn count(&self) -> usize
pub fn contains(&self, id: &str) -> bool
pub fn clear(&mut self) -> EvolveResult<()>
Trait Implementations§
Source§impl Debug for PatternStore
impl Debug for PatternStore
Auto Trait Implementations§
impl Freeze for PatternStore
impl RefUnwindSafe for PatternStore
impl Send for PatternStore
impl Sync for PatternStore
impl Unpin for PatternStore
impl UnsafeUnpin for PatternStore
impl UnwindSafe for PatternStore
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