pub(super) struct VolumeSlot {
pub(super) label: String,
pub(super) phase: Mutex<VolumeState>,
pub(super) scanned: Mutex<u64>,
pub(super) index: RwLock<Option<VolumeIndex>>,
pub(super) stop: Arc<AtomicBool>,
pub(super) last_query: Mutex<Option<VolumeQueryCache>>,
pub(super) checkpoint: Mutex<Option<JournalCheckpoint>>,
pub(super) last_saved: Mutex<Option<(u64, u64)>>,
pub(super) save_lock: Mutex<()>,
pub(super) store: Arc<dyn SnapshotStore>,
pub(super) kind: WorkerKind,
}Fields§
§label: String§phase: Mutex<VolumeState>§scanned: Mutex<u64>§index: RwLock<Option<VolumeIndex>>§stop: Arc<AtomicBool>§last_query: Mutex<Option<VolumeQueryCache>>Single-entry query cache (lock order: index read first, then this).
checkpoint: Mutex<Option<JournalCheckpoint>>None until the volume is Ready (flush skips it).
last_saved: Mutex<Option<(u64, u64)>>(content, structural) generations at the last snapshot save — the dirty check that keeps periodic flushes from rewriting unchanged volumes.
save_lock: Mutex<()>Serializes snapshot writers for this slot (flush vs. stop-save).
store: Arc<dyn SnapshotStore>Snapshot persistence seam for this volume (ADR-0018) — production
is WinSnapshotStore on snapshot_path(...).
kind: WorkerKindInitial-scan + change source this slot drives (ADR-0024).
Implementations§
Source§impl VolumeSlot
impl VolumeSlot
Sourcepub(super) fn scanning(label: String, store: Arc<dyn SnapshotStore>) -> Self
pub(super) fn scanning(label: String, store: Arc<dyn SnapshotStore>) -> Self
A privileged ($MFT + USN) slot in its initial Scanning state — the
shape index_start (and the worker tests) spawn workers on.
Sourcepub(super) fn scanning_walk(
label: String,
store: Arc<dyn SnapshotStore>,
roots: Vec<String>,
excludes: Vec<String>,
) -> Self
pub(super) fn scanning_walk( label: String, store: Arc<dyn SnapshotStore>, roots: Vec<String>, excludes: Vec<String>, ) -> Self
A non-elevated scope-mode (folder-walk + watcher) slot (ADR-0024).
fn scanning_kind( label: String, store: Arc<dyn SnapshotStore>, kind: WorkerKind, ) -> Self
Sourcepub(super) fn install_index(&self, idx: VolumeIndex)
pub(super) fn install_index(&self, idx: VolumeIndex)
Install a freshly built index. Replacing an existing one is a
structural change (journal-gone full rescan): the new index inherits
the previous structural_generation + 1 so open ResultSets go
hard-stale (docs/ARCHITECTURE.md, 2-layer generation). A first install
(initial scan or snapshot restore) keeps the value the index was
built with.
Auto Trait Implementations§
impl !Freeze for VolumeSlot
impl !RefUnwindSafe for VolumeSlot
impl Send for VolumeSlot
impl Sync for VolumeSlot
impl Unpin for VolumeSlot
impl UnsafeUnpin for VolumeSlot
impl !UnwindSafe for VolumeSlot
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
§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>
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>
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