pub struct Builder { /* private fields */ }Expand description
Index builder — orchestrates the full pipeline from file discovery to shard serialization.
Implementations§
Source§impl Builder
impl Builder
Sourcepub fn new(root: &Path) -> Result<Self>
pub fn new(root: &Path) -> Result<Self>
Creates a new builder for the given root directory.
§Errors
Returns an error if the .ix directory cannot be created or temp files
cannot be opened.
Sourcepub const fn with_resource_guard(self, guard: ResourceGuard) -> Self
pub const fn with_resource_guard(self, guard: ResourceGuard) -> Self
Attach a ResourceGuard for memory-pressure-driven flush.
Sourcepub const fn set_decompress(&mut self, decompress: bool)
pub const fn set_decompress(&mut self, decompress: bool)
Enable or disable transparent decompression of archives during scanning.
Sourcepub const fn set_max_file_size(&mut self, max_bytes: u64)
pub const fn set_max_file_size(&mut self, max_bytes: u64)
Set the maximum file size to index (0 = unlimited). Default: 100 MB.
Sourcepub fn build(&mut self) -> Result<PathBuf>
pub fn build(&mut self) -> Result<PathBuf>
Build or rebuild the index from scratch.
§Errors
Returns an error if the build process fails (I/O, disk space, etc.).
Sourcepub fn update(&mut self, _changed_files: &[PathBuf]) -> Result<PathBuf>
pub fn update(&mut self, _changed_files: &[PathBuf]) -> Result<PathBuf>
Update the index for changed files (currently does a full rebuild).
§Errors
Returns an error if the build process fails.
Sourcepub const fn files_len(&self) -> usize
pub const fn files_len(&self) -> usize
Number of files indexed so far (snapshot for progress reporting).
Sourcepub const fn trigrams_len(&self) -> usize
pub const fn trigrams_len(&self) -> usize
Number of unique trigrams accumulated so far.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Builder
impl RefUnwindSafe for Builder
impl Send for Builder
impl Sync for Builder
impl Unpin for Builder
impl UnsafeUnpin for Builder
impl UnwindSafe for Builder
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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