pub struct ScanCache { /* private fields */ }Expand description
Scan cache for storing processed results
Implementations§
Source§impl ScanCache
impl ScanCache
Sourcepub fn get_file_classes(
&mut self,
path: &PathBuf,
) -> Option<&Vec<ExtractedClass>>
pub fn get_file_classes( &mut self, path: &PathBuf, ) -> Option<&Vec<ExtractedClass>>
Get cached classes for a file
Sourcepub fn update_file(&mut self, path: PathBuf, classes: Vec<ExtractedClass>)
pub fn update_file(&mut self, path: PathBuf, classes: Vec<ExtractedClass>)
Update file classes in cache
Sourcepub fn remove_file(&mut self, path: &PathBuf)
pub fn remove_file(&mut self, path: &PathBuf)
Remove file from cache
Sourcepub fn get_stats(&self) -> CacheStats
pub fn get_stats(&self) -> CacheStats
Get cache statistics
Sourcepub fn clean_expired(&mut self)
pub fn clean_expired(&mut self)
Clean expired entries
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ScanCache
impl RefUnwindSafe for ScanCache
impl Send for ScanCache
impl Sync for ScanCache
impl Unpin for ScanCache
impl UnsafeUnpin for ScanCache
impl UnwindSafe for ScanCache
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