pub struct PatternMatcher;Expand description
Matches refactoring patterns in code
Implementations§
Source§impl PatternMatcher
impl PatternMatcher
Sourcepub fn match_rule(
code: &str,
rule: &RefactoringRule,
) -> Result<Vec<MatchResult>>
pub fn match_rule( code: &str, rule: &RefactoringRule, ) -> Result<Vec<MatchResult>>
Match a rule pattern against code
Sourcepub fn match_rules(
code: &str,
rules: &[RefactoringRule],
) -> Result<HashMap<String, Vec<MatchResult>>>
pub fn match_rules( code: &str, rules: &[RefactoringRule], ) -> Result<HashMap<String, Vec<MatchResult>>>
Match multiple rules against code
Sourcepub fn is_applicable(
refactoring_type: RefactoringType,
matched_patterns: &[&str],
) -> bool
pub fn is_applicable( refactoring_type: RefactoringType, matched_patterns: &[&str], ) -> bool
Check if a refactoring type is applicable based on matched patterns
Auto Trait Implementations§
impl Freeze for PatternMatcher
impl RefUnwindSafe for PatternMatcher
impl Send for PatternMatcher
impl Sync for PatternMatcher
impl Unpin for PatternMatcher
impl UnwindSafe for PatternMatcher
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