pub struct ScanOptions {Show 21 fields
pub max_file_bytes: u64,
pub extensions: BTreeSet<String>,
pub file_types: NamedFileTypes,
pub ignore_files: Vec<String>,
pub override_rules: Vec<String>,
pub ignore_policy: IgnorePolicy,
pub ignore_case_insensitive: bool,
pub skip_hidden: bool,
pub standard_skips: StandardSkips,
pub hash_file_contents: bool,
pub detect_binary_files: bool,
pub evidence: EvidenceMode,
pub parallelism: usize,
pub traversal_parallelism: Option<usize>,
pub content_parallelism: Option<usize>,
pub limits: ScanLimits,
pub cancellation: Option<CancellationToken>,
pub cache_validation: CacheValidationPolicy,
pub content_validation: ContentValidationPolicy,
pub content_discovery: ContentDiscoveryMode,
pub walk: WalkOptions,
}Fields§
§max_file_bytes: u64§extensions: BTreeSet<String>§file_types: NamedFileTypesReusable named file-pattern groups, combined with extensions.
ignore_files: Vec<String>§override_rules: Vec<String>High-precedence include/exclude globs using ignore::Override syntax.
ignore_policy: IgnorePolicyControls parent, repository-exclude and global Git ignore sources.
ignore_case_insensitive: boolMatch ignore patterns without ASCII case sensitivity.
Skip dot-prefixed and native Windows-hidden entries unless included.
standard_skips: StandardSkips§hash_file_contents: bool§detect_binary_files: bool§evidence: EvidenceModeRecord typed evidence for entries excluded by policy.
parallelism: usizeTraversal and content-inspection workers. Zero selects available parallelism. Retained as the shared backward-compatible default.
traversal_parallelism: Option<usize>Optional traversal-only worker override. Some(0) selects available
parallelism independently of content inspection.
content_parallelism: Option<usize>Optional content-inspection worker override. Some(0) selects
available parallelism independently of traversal.
limits: ScanLimitsWhole-scan resource bounds. All limits are disabled by default.
cancellation: Option<CancellationToken>Optional cooperative cancellation signal.
cache_validation: CacheValidationPolicyPersistent hash validation policy.
content_validation: ContentValidationPolicyNew content-read validation policy.
content_discovery: ContentDiscoveryModeCandidate-discovery policy for content visits.
walk: WalkOptionsLow-level traversal policy.
Implementations§
Source§impl ScanOptions
impl ScanOptions
pub const fn with_max_depth(self, max_depth: Option<usize>) -> Self
pub const fn with_min_depth(self, min_depth: usize) -> Self
pub const fn with_max_open(self, max_open: usize) -> Self
pub const fn with_same_file_system(self, enabled: bool) -> Self
pub const fn with_follow_links(self, enabled: bool) -> Self
pub const fn with_error_policy(self, policy: ErrorPolicy) -> Self
pub const fn with_root_symlink_policy(self, policy: RootSymlinkPolicy) -> Self
Source§impl ScanOptions
impl ScanOptions
pub fn with_extensions<I, S>(self, extensions: I) -> Self
Sourcepub fn with_file_types(self, file_types: NamedFileTypes) -> Self
pub fn with_file_types(self, file_types: NamedFileTypes) -> Self
Replaces named file-type definitions and selections.
pub fn with_ignore_files<I, S>(self, names: I) -> Self
Sourcepub fn with_override_rules<I, S>(self, rules: I) -> Self
pub fn with_override_rules<I, S>(self, rules: I) -> Self
Replaces request-level override globs.
Like ignore::Override, ordinary patterns include matching paths and
leading ! patterns exclude them.
pub const fn with_ignore_case_insensitive(self, enabled: bool) -> Self
pub fn with_ignore_policy(self, policy: IgnorePolicy) -> Self
Sourcepub fn metadata_only(self) -> Self
pub fn metadata_only(self) -> Self
Disables file-content reads for the fastest metadata-only discovery.
The resulting report does not contain content hashes and may include binary files whose extension matches the configured filter.
Sourcepub const fn selected_files_only(self) -> Self
pub const fn selected_files_only(self) -> Self
Keeps only the selected manifest and warnings, without skip evidence.
Sourcepub const fn with_parallelism(self, parallelism: usize) -> Self
pub const fn with_parallelism(self, parallelism: usize) -> Self
Sets the shared traversal and content worker default.
A later traversal- or content-specific override takes precedence.
Sourcepub const fn with_traversal_parallelism(self, parallelism: usize) -> Self
pub const fn with_traversal_parallelism(self, parallelism: usize) -> Self
Sets traversal workers without changing content-inspection workers.
Sourcepub const fn with_content_parallelism(self, parallelism: usize) -> Self
pub const fn with_content_parallelism(self, parallelism: usize) -> Self
Sets content-inspection workers without changing traversal workers.
Sourcepub const fn with_content_discovery(self, mode: ContentDiscoveryMode) -> Self
pub const fn with_content_discovery(self, mode: ContentDiscoveryMode) -> Self
Sets candidate discovery for content visits.
pub const fn with_max_entries(self, max_entries: Option<u64>) -> Self
pub const fn with_max_total_bytes(self, max_total_bytes: Option<u64>) -> Self
pub const fn with_timeout(self, timeout: Option<Duration>) -> Self
pub fn with_cancellation(self, cancellation: CancellationToken) -> Self
pub const fn with_cache_validation(self, policy: CacheValidationPolicy) -> Self
pub const fn with_content_validation( self, policy: ContentValidationPolicy, ) -> Self
Trait Implementations§
Source§impl Clone for ScanOptions
impl Clone for ScanOptions
Source§fn clone(&self) -> ScanOptions
fn clone(&self) -> ScanOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more