pub struct SearchOptions {
pub base_dirs: Vec<PathBuf>,
pub pattern: String,
pub max_depth: u32,
pub include_dirs: bool,
pub case_insensitive: bool,
pub search_in_files: bool,
pub include_patterns: Vec<String>,
pub exclude_dirs: Vec<String>,
pub max_line_length: usize,
pub binary_check_bytes: usize,
pub max_results: usize,
}Expand description
All parameters that control a single search operation.
Use SearchOptions::builder for a fluent construction API, or
construct directly for multi-path searches via SearchOptions::base_dirs.
Fields§
§base_dirs: Vec<PathBuf>One or more directories to search. At least one must be provided. When multiple directories are given, results from all roots are merged and de-duplicated.
pattern: StringPattern to match (supports * / ? wildcards, or plain substring).
max_depth: u32Maximum recursion depth per directory (0 = only that directory itself).
include_dirs: boolInclude directory entries in filename-search results.
case_insensitive: boolMatch case-insensitively.
search_in_files: boolSearch for pattern inside file contents instead of matching names.
include_patterns: Vec<String>Only include files that match these glob patterns (empty = all).
exclude_dirs: Vec<String>Directory names to skip entirely during traversal.
max_line_length: usizeLines longer than this are skipped during content search.
binary_check_bytes: usizeBytes read to probe for binary content.
max_results: usizeCap the total number of results returned (0 = unlimited).
Implementations§
Source§impl SearchOptions
impl SearchOptions
Trait Implementations§
Source§impl Clone for SearchOptions
impl Clone for SearchOptions
Source§fn clone(&self) -> SearchOptions
fn clone(&self) -> SearchOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for SearchOptions
impl RefUnwindSafe for SearchOptions
impl Send for SearchOptions
impl Sync for SearchOptions
impl Unpin for SearchOptions
impl UnsafeUnpin for SearchOptions
impl UnwindSafe for SearchOptions
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
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>
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>
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