pub struct HashConfig {
pub threads: Option<usize>,
pub buffer_size: Option<usize>,
pub mmap_threshold: Option<u64>,
}Expand description
Configuration for directory hashing behavior.
Fields§
§threads: Option<usize>Number of threads to use for parallel hashing.
If None, uses the default Rayon thread pool size.
buffer_size: Option<usize>Buffer size for reading files (in bytes).
mmap_threshold: Option<u64>Threshold for using memory mapping (in bytes).
Implementations§
Source§impl HashConfig
impl HashConfig
Sourcepub fn with_threads(self, threads: usize) -> Self
pub fn with_threads(self, threads: usize) -> Self
Sets the number of threads to use.
Sourcepub fn with_buffer_size(self, size: usize) -> Self
pub fn with_buffer_size(self, size: usize) -> Self
Sets the buffer size for file reading.
Sourcepub fn with_mmap_threshold(self, threshold: u64) -> Self
pub fn with_mmap_threshold(self, threshold: u64) -> Self
Sets the threshold for using memory mapping.
Trait Implementations§
Source§impl Clone for HashConfig
impl Clone for HashConfig
Source§fn clone(&self) -> HashConfig
fn clone(&self) -> HashConfig
Returns a duplicate of the value. Read more
1.0.0 · 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 HashConfig
impl Debug for HashConfig
Auto Trait Implementations§
impl Freeze for HashConfig
impl RefUnwindSafe for HashConfig
impl Send for HashConfig
impl Sync for HashConfig
impl Unpin for HashConfig
impl UnwindSafe for HashConfig
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