pub struct ScanCache {
pub format_version: u32,
pub root: PathBuf,
pub entries: Vec<ScanCacheEntry>,
}Expand description
Versioned local cache for incremental scans.
Unlike ScanReport, this contains no absolute per-file paths, skipped
entries, warnings, ignore diagnostics, or manifest metadata.
Fields§
§format_version: u32§root: PathBuf§entries: Vec<ScanCacheEntry>Implementations§
Source§impl ScanCache
impl ScanCache
Sourcepub fn from_report(report: &ScanReport) -> Self
pub fn from_report(report: &ScanReport) -> Self
Builds a compact cache from reusable SHA-256 evidence.
Sourcepub fn is_compatible(&self, root: &Path) -> bool
pub fn is_compatible(&self, root: &Path) -> bool
Returns whether this cache can be considered for root.
Sourcepub fn invalidate<'a, I>(&mut self, relative_paths: I) -> usizewhere
I: IntoIterator<Item = &'a str>,
pub fn invalidate<'a, I>(&mut self, relative_paths: I) -> usizewhere
I: IntoIterator<Item = &'a str>,
Removes reusable entries for the supplied normalized relative paths.
Returns the number of entries removed.
Sourcepub fn apply_watch_plan(&mut self, plan: &WatchPlan) -> usize
pub fn apply_watch_plan(&mut self, plan: &WatchPlan) -> usize
Applies a watcher plan, clearing everything when selection may change.
Returns the number of entries removed.
Trait Implementations§
impl Eq for ScanCache
impl StructuralPartialEq for ScanCache
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