pub struct PatternExtractor<'g> { /* private fields */ }Expand description
Extracts and validates patterns in the codebase.
Implementations§
Source§impl<'g> PatternExtractor<'g>
impl<'g> PatternExtractor<'g>
pub fn new(graph: &'g CodeGraph) -> Self
Sourcepub fn extract_patterns(&self) -> Vec<ExtractedPattern>
pub fn extract_patterns(&self) -> Vec<ExtractedPattern>
Extract all detected patterns from the codebase.
Sourcepub fn check_patterns(&self, unit_id: u64) -> Vec<PatternViolation>
pub fn check_patterns(&self, unit_id: u64) -> Vec<PatternViolation>
Check code against detected patterns.
Sourcepub fn suggest_patterns(&self, file_path: &str) -> Vec<ExtractedPattern>
pub fn suggest_patterns(&self, file_path: &str) -> Vec<ExtractedPattern>
Suggest patterns for new code based on location.
Auto Trait Implementations§
impl<'g> Freeze for PatternExtractor<'g>
impl<'g> RefUnwindSafe for PatternExtractor<'g>
impl<'g> Send for PatternExtractor<'g>
impl<'g> Sync for PatternExtractor<'g>
impl<'g> Unpin for PatternExtractor<'g>
impl<'g> UnsafeUnpin for PatternExtractor<'g>
impl<'g> UnwindSafe for PatternExtractor<'g>
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