pub struct IndexConfig {
pub max_threads: usize,
pub compute_phash: bool,
pub max_file_size: u64,
pub min_file_size: u64,
pub allowed_extensions: Vec<String>,
}Expand description
Configuration for ParallelIndexer.
Fields§
§max_threads: usizeMaximum number of rayon worker threads to use.
0 means “use rayon’s global default” (typically one per logical CPU).
compute_phash: boolWhether to also compute a 64-bit perceptual hash (pHash) for each file.
pHash computation requires decoding a thumbnail from the file data. When no real image data is available (e.g., in tests) this is computed from a synthetic 8×8 grayscale image derived from the content hash.
max_file_size: u64Skip files larger than this threshold (bytes). 0 means no limit.
min_file_size: u64Skip files smaller than this threshold (bytes). Useful for ignoring tiny sidecar / thumbnail files.
allowed_extensions: Vec<String>File extensions to include (e.g. ["mp4", "mkv"]).
An empty list means all extensions are accepted.
Trait Implementations§
Source§impl Clone for IndexConfig
impl Clone for IndexConfig
Source§fn clone(&self) -> IndexConfig
fn clone(&self) -> IndexConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for IndexConfig
impl Debug for IndexConfig
Auto Trait Implementations§
impl Freeze for IndexConfig
impl RefUnwindSafe for IndexConfig
impl Send for IndexConfig
impl Sync for IndexConfig
impl Unpin for IndexConfig
impl UnsafeUnpin for IndexConfig
impl UnwindSafe for IndexConfig
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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