pub struct PatternStore { /* private fields */ }Expand description
Stores and manages refactoring patterns
Implementations§
Source§impl PatternStore
impl PatternStore
Sourcepub async fn add_pattern(&self, pattern: RefactoringPattern) -> Result<()>
pub async fn add_pattern(&self, pattern: RefactoringPattern) -> Result<()>
Add a pattern to the store
Sourcepub async fn get_pattern(
&self,
name: &str,
) -> Result<Option<RefactoringPattern>>
pub async fn get_pattern( &self, name: &str, ) -> Result<Option<RefactoringPattern>>
Get a pattern by name (project patterns take precedence)
Sourcepub async fn list_patterns(&self) -> Result<Vec<RefactoringPattern>>
pub async fn list_patterns(&self) -> Result<Vec<RefactoringPattern>>
List all patterns
Sourcepub async fn remove_pattern(&self, name: &str) -> Result<()>
pub async fn remove_pattern(&self, name: &str) -> Result<()>
Remove a pattern
Sourcepub async fn pattern_count(&self) -> Result<usize>
pub async fn pattern_count(&self) -> Result<usize>
Get pattern count
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PatternStore
impl !RefUnwindSafe for PatternStore
impl Send for PatternStore
impl Sync for PatternStore
impl Unpin 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