pub struct IncrementalDirState {
mtimes: Arc<Mutex<HashMap<String, i64>>>,
pending: Arc<Mutex<Vec<(String, i64)>>>,
}Expand description
Snapshot + in-scan updates for incremental directory skipping (scan_unified and
standalone per-type walkers). Persisted in SQLite under domain "unified" so all scan modes
share one mtime map.
Fields§
§mtimes: Arc<Mutex<HashMap<String, i64>>>§pending: Arc<Mutex<Vec<(String, i64)>>>Implementations§
Source§impl IncrementalDirState
impl IncrementalDirState
pub fn new(snapshot: HashMap<String, i64>) -> Self
Sourcepub fn should_skip(&self, dir: &Path) -> bool
pub fn should_skip(&self, dir: &Path) -> bool
Skip this directory (and its subtree) when stored mtime ≥ current — same rule as
scan_unified.
Sourcepub fn record_scanned_dir(&self, dir: &Path)
pub fn record_scanned_dir(&self, dir: &Path)
Call after successfully listing/processing a directory so the next run can skip it if unchanged.
pub fn take_pending(&self) -> Vec<(String, i64)>
Auto Trait Implementations§
impl Freeze for IncrementalDirState
impl RefUnwindSafe for IncrementalDirState
impl Send for IncrementalDirState
impl Sync for IncrementalDirState
impl Unpin for IncrementalDirState
impl UnwindSafe for IncrementalDirState
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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