pub struct UnifiedAnalysisCache { /* private fields */ }Expand description
Unified analysis cache manager
Implementations§
Source§impl UnifiedAnalysisCache
impl UnifiedAnalysisCache
Sourcepub fn new(project_path: Option<&Path>) -> Result<Self>
pub fn new(project_path: Option<&Path>) -> Result<Self>
Create a new unified analysis cache manager
Sourcepub fn generate_key(
project_path: &Path,
source_files: &[PathBuf],
complexity_threshold: u32,
duplication_threshold: usize,
coverage_file: Option<&Path>,
semantic_off: bool,
parallel: bool,
) -> Result<UnifiedAnalysisCacheKey>
pub fn generate_key( project_path: &Path, source_files: &[PathBuf], complexity_threshold: u32, duplication_threshold: usize, coverage_file: Option<&Path>, semantic_off: bool, parallel: bool, ) -> Result<UnifiedAnalysisCacheKey>
Generate cache key for unified analysis
Sourcepub fn get(&mut self, key: &UnifiedAnalysisCacheKey) -> Option<UnifiedAnalysis>
pub fn get(&mut self, key: &UnifiedAnalysisCacheKey) -> Option<UnifiedAnalysis>
Get cached unified analysis if available and valid
Sourcepub fn put(
&mut self,
key: UnifiedAnalysisCacheKey,
analysis: UnifiedAnalysis,
source_files: Vec<PathBuf>,
) -> Result<()>
pub fn put( &mut self, key: UnifiedAnalysisCacheKey, analysis: UnifiedAnalysis, source_files: Vec<PathBuf>, ) -> Result<()>
Put unified analysis result in cache
Sourcepub fn set_max_age(&mut self, seconds: u64)
pub fn set_max_age(&mut self, seconds: u64)
Set maximum cache age in seconds
Sourcepub fn should_use_cache(file_count: usize, has_coverage: bool) -> bool
pub fn should_use_cache(file_count: usize, has_coverage: bool) -> bool
Check if we should use cache based on project size
Auto Trait Implementations§
impl Freeze for UnifiedAnalysisCache
impl RefUnwindSafe for UnifiedAnalysisCache
impl Send for UnifiedAnalysisCache
impl Sync for UnifiedAnalysisCache
impl Unpin for UnifiedAnalysisCache
impl UnwindSafe for UnifiedAnalysisCache
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more