pub struct DuplicateOptions {
pub base_dir: PathBuf,
pub max_depth: u32,
pub mode: DuplicateMode,
pub algorithm: HashAlgorithm,
pub buffer_size: usize,
pub min_size: u64,
pub max_size: u64,
pub skip_binary: bool,
pub binary_check_bytes: usize,
pub include_patterns: Vec<String>,
pub exclude_dirs: Vec<String>,
pub max_results: usize,
}Expand description
All parameters for a single duplicate-detection run.
Fields§
§base_dir: PathBufRoot directory to scan.
max_depth: u32Maximum recursion depth (0 = only base_dir).
mode: DuplicateModeDetection mode.
algorithm: HashAlgorithmHashing algorithm (only used in DuplicateMode::Content).
buffer_size: usizeRead buffer size for hashing (bytes).
min_size: u64Skip files smaller than this (bytes). 0 = include all.
max_size: u64Skip files larger than this (bytes). 0 = no limit.
skip_binary: boolSkip binary files.
binary_check_bytes: usizeBinary-check probe length.
include_patterns: Vec<String>Only include files matching these glob patterns (empty = all).
exclude_dirs: Vec<String>Directory names to skip entirely.
max_results: usizeCap results (0 = unlimited).
Implementations§
Source§impl DuplicateOptions
impl DuplicateOptions
Sourcepub fn from_config(cfg: &Config, base_dir: PathBuf) -> FsearchResult<Self>
pub fn from_config(cfg: &Config, base_dir: PathBuf) -> FsearchResult<Self>
Construct from a Config.
Sourcepub fn builder(base_dir: impl Into<PathBuf>) -> DuplicateOptionsBuilder
pub fn builder(base_dir: impl Into<PathBuf>) -> DuplicateOptionsBuilder
Fluent builder entry-point.
Trait Implementations§
Source§impl Clone for DuplicateOptions
impl Clone for DuplicateOptions
Source§fn clone(&self) -> DuplicateOptions
fn clone(&self) -> DuplicateOptions
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 moreAuto Trait Implementations§
impl Freeze for DuplicateOptions
impl RefUnwindSafe for DuplicateOptions
impl Send for DuplicateOptions
impl Sync for DuplicateOptions
impl Unpin for DuplicateOptions
impl UnsafeUnpin for DuplicateOptions
impl UnwindSafe for DuplicateOptions
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