pub struct ScanConfig {
pub root: PathBuf,
pub follow_symlinks: bool,
pub cross_filesystems: bool,
pub apparent_size: bool,
pub max_depth: Option<u32>,
pub ignore_patterns: Vec<String>,
pub threads: usize,
pub include_hidden: bool,
pub compute_hashes: bool,
pub min_hash_size: u64,
}Expand description
Configuration for scanning operations.
Fields§
§root: PathBufRoot path to scan.
follow_symlinks: boolFollow symbolic links.
cross_filesystems: boolCross filesystem boundaries.
apparent_size: boolUse apparent size vs disk usage.
max_depth: Option<u32>Maximum depth to traverse (None = unlimited).
ignore_patterns: Vec<String>Patterns to ignore (gitignore syntax).
threads: usizeNumber of threads for scanning (0 = auto-detect).
Include hidden files (starting with .).
compute_hashes: boolCompute content hashes during scan.
min_hash_size: u64Minimum file size to hash (skip tiny files).
Implementations§
Source§impl ScanConfig
impl ScanConfig
Sourcepub fn builder() -> ScanConfigBuilder
pub fn builder() -> ScanConfigBuilder
Create a new scan config builder.
Sourcepub fn new(root: impl Into<PathBuf>) -> ScanConfig
pub fn new(root: impl Into<PathBuf>) -> ScanConfig
Create a simple config for scanning a path.
Sourcepub fn should_ignore(&self, name: &str) -> bool
pub fn should_ignore(&self, name: &str) -> bool
Check if a path should be ignored based on patterns.
Check if hidden files should be skipped.
Trait Implementations§
Source§impl Clone for ScanConfig
impl Clone for ScanConfig
Source§fn clone(&self) -> ScanConfig
fn clone(&self) -> ScanConfig
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 ScanConfig
impl Debug for ScanConfig
Source§impl Default for ScanConfig
impl Default for ScanConfig
Source§fn default() -> ScanConfig
fn default() -> ScanConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ScanConfig
impl<'de> Deserialize<'de> for ScanConfig
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ScanConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ScanConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for ScanConfig
impl Serialize for ScanConfig
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for ScanConfig
impl RefUnwindSafe for ScanConfig
impl Send for ScanConfig
impl Sync for ScanConfig
impl Unpin for ScanConfig
impl UnwindSafe for ScanConfig
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