pub struct CrossFileAnalyzer { /* private fields */ }Expand description
Core analyzer for detecting duplicated code across multiple files
Implementations§
Source§impl CrossFileAnalyzer
impl CrossFileAnalyzer
Sourcepub fn with_config(config: CrossFileConfig) -> Self
pub fn with_config(config: CrossFileConfig) -> Self
Create a new analyzer with custom configuration
Sourcepub fn process_file(
&mut self,
file_path: &Path,
content: &str,
) -> Result<(), String>
pub fn process_file( &mut self, file_path: &Path, content: &str, ) -> Result<(), String>
Process a single Rust source file and extract function fingerprints
Sourcepub fn find_all_duplicates(&self) -> Vec<CrossFileIssue>
pub fn find_all_duplicates(&self) -> Vec<CrossFileIssue>
Find all duplicate patterns across files that meet the threshold criteria
Sourcepub fn find_near_duplicates(&self) -> Vec<CrossFileIssue>
pub fn find_near_duplicates(&self) -> Vec<CrossFileIssue>
Find near-duplicates using fuzzy matching (more expensive, use sparingly)
Sourcepub fn estimated_memory_usage(&self) -> usize
pub fn estimated_memory_usage(&self) -> usize
Estimate current memory usage in bytes (approximate)
Sourcepub fn evict_old_entries(&mut self)
pub fn evict_old_entries(&mut self)
Evict old entries to free memory when approaching limit
Sourcepub fn stats(&self) -> AnalysisStats
pub fn stats(&self) -> AnalysisStats
Get statistics about the analysis
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CrossFileAnalyzer
impl RefUnwindSafe for CrossFileAnalyzer
impl Send for CrossFileAnalyzer
impl Sync for CrossFileAnalyzer
impl Unpin for CrossFileAnalyzer
impl UnsafeUnpin for CrossFileAnalyzer
impl UnwindSafe for CrossFileAnalyzer
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