pub struct AnalysisCache { /* private fields */ }Expand description
Analysis cache manager
Implementations§
Source§impl AnalysisCache
impl AnalysisCache
Sourcepub fn needs_analysis(
&self,
path: &Path,
content: &str,
mtime: SystemTime,
) -> bool
pub fn needs_analysis( &self, path: &Path, content: &str, mtime: SystemTime, ) -> bool
Check if file needs re-analysis
Sourcepub fn mark_analyzed(&mut self, path: PathBuf, content: &str, mtime: SystemTime)
pub fn mark_analyzed(&mut self, path: PathBuf, content: &str, mtime: SystemTime)
Mark file as analyzed
Sourcepub fn is_enabled(&self) -> bool
pub fn is_enabled(&self) -> bool
Check if cache is enabled
Sourcepub fn get_content_hash(&self, path: &Path) -> Option<u64>
pub fn get_content_hash(&self, path: &Path) -> Option<u64>
Get the content hash for a file path
Sourcepub fn store_analysis(
&self,
_path: &Path,
content: &str,
analysis: &FileAnalysis,
) -> Result<()>
pub fn store_analysis( &self, _path: &Path, content: &str, analysis: &FileAnalysis, ) -> Result<()>
Store FileAnalysis results to disk cache
Sourcepub fn load_analysis(&self, path: &Path, content: &str) -> Option<FileAnalysis>
pub fn load_analysis(&self, path: &Path, content: &str) -> Option<FileAnalysis>
Load FileAnalysis results from disk cache
Sourcepub fn save_analysis(
&self,
path: &Path,
hash: u64,
analysis: &FileAnalysis,
) -> Result<()>
pub fn save_analysis( &self, path: &Path, hash: u64, analysis: &FileAnalysis, ) -> Result<()>
Save analysis results to cache (alias for store_analysis)
Stores the full FileAnalysis to .qryon/cache/analysis/{hash}.json
where hash is the content hash of the source file.
Sourcepub fn load_analysis_by_hash(
&self,
_path: &Path,
hash: u64,
) -> Option<FileAnalysis>
pub fn load_analysis_by_hash( &self, _path: &Path, hash: u64, ) -> Option<FileAnalysis>
Load cached analysis results by hash
Returns the cached FileAnalysis if it exists and matches the given hash. Returns None if cache miss or cache is disabled.
Sourcepub fn get_analysis_summary(
&self,
path: &Path,
hash: u64,
) -> Option<CachedFileAnalysis>
pub fn get_analysis_summary( &self, path: &Path, hash: u64, ) -> Option<CachedFileAnalysis>
Get a summary of cached analysis without loading full results
Useful for quick checks without deserializing the full findings list.
Auto Trait Implementations§
impl Freeze for AnalysisCache
impl RefUnwindSafe for AnalysisCache
impl Send for AnalysisCache
impl Sync for AnalysisCache
impl Unpin for AnalysisCache
impl UnwindSafe for AnalysisCache
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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