pub struct ParallelIndexer { /* private fields */ }Expand description
Parallel bulk file indexer.
Uses rayon to hash files concurrently. Create via ParallelIndexer::new
and call ParallelIndexer::index_files to start.
Implementations§
Source§impl ParallelIndexer
impl ParallelIndexer
Sourcepub fn new(config: IndexConfig) -> Self
pub fn new(config: IndexConfig) -> Self
Create a new indexer with the given configuration.
Sourcepub fn with_progress(self, f: ProgressFn) -> Self
pub fn with_progress(self, f: ProgressFn) -> Self
Attach a progress callback.
The callback receives (completed, total) counts.
Sourcepub fn index_files(&self, paths: &[PathBuf]) -> IndexResult
pub fn index_files(&self, paths: &[PathBuf]) -> IndexResult
Index a batch of file paths in parallel.
Files that do not pass the configured filters (size limits, extension
whitelist) are silently skipped. Files that cannot be read are added
to IndexResult::errors.
Auto Trait Implementations§
impl !RefUnwindSafe for ParallelIndexer
impl !UnwindSafe for ParallelIndexer
impl Freeze for ParallelIndexer
impl Send for ParallelIndexer
impl Sync for ParallelIndexer
impl Unpin for ParallelIndexer
impl UnsafeUnpin for ParallelIndexer
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
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