pub struct VolumeIndexBuilder {
idx: VolumeIndex,
parent_frns: Vec<Frn>,
}Expand description
Two-pass builder for the initial scan: collect everything, then resolve parents and sort the permutations (scan order ≠ parent-before-child).
Fields§
§idx: VolumeIndex§parent_frns: Vec<Frn>Implementations§
Source§impl VolumeIndexBuilder
impl VolumeIndexBuilder
Sourcepub fn new(volume_label: &str, root_record: u64) -> Self
pub fn new(volume_label: &str, root_record: u64) -> Self
volume_label is the root display name, e.g. C:.
root_record is the MFT record number of the root directory (5 on NTFS).
Sourcepub fn push(&mut self, e: RawEntry<'_>)
pub fn push(&mut self, e: RawEntry<'_>)
Append a scanned entry with a provisional ROOT parent; the real
parent is resolved later in Self::finish once the FRN index exists.
Sourcepub fn push_encoded(&mut self, e: EncodedEntry<'_>)
pub fn push_encoded(&mut self, e: EncodedEntry<'_>)
Append an entry whose name was WTF-8 encoded off-thread (parallel
scan workers). Identical semantics to Self::push.
Sourcepub const fn is_empty(&self) -> bool
pub const fn is_empty(&self) -> bool
True when no entries have been pushed (never true after Self::new,
which seeds the root).
Sourcepub fn finish(self) -> VolumeIndex
pub fn finish(self) -> VolumeIndex
Run the two-pass finalization and return the queryable VolumeIndex,
discarding the stage timings.
Sourcepub fn finish_timed(self) -> (VolumeIndex, FinishTimings)
pub fn finish_timed(self) -> (VolumeIndex, FinishTimings)
Run the two-pass finalization (resolve parents, propagate EXCLUDED,
build the name sort) and return the VolumeIndex with stage timings.
Auto Trait Implementations§
impl !Freeze for VolumeIndexBuilder
impl !RefUnwindSafe for VolumeIndexBuilder
impl Send for VolumeIndexBuilder
impl Sync for VolumeIndexBuilder
impl Unpin for VolumeIndexBuilder
impl UnsafeUnpin for VolumeIndexBuilder
impl !UnwindSafe for VolumeIndexBuilder
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