pub struct WalkOptions {
pub max_depth: Option<usize>,
pub min_depth: Option<usize>,
pub max_filesize: Option<u64>,
pub entry_types: EntryTypes,
pub respect_gitignore: bool,
pub include_hidden: bool,
pub filter: IncludeExclude,
pub follow_symlinks: bool,
pub on_error: Option<Arc<dyn Fn(&Path, &WalkerError) + Send + Sync>>,
pub types: Option<Arc<Types>>,
}Expand description
Options for file walking.
Fields§
§max_depth: Option<usize>Maximum depth to recurse (None = unlimited).
min_depth: Option<usize>Suppress yielding entries whose containing directory is at depth less
than this. Descent is unaffected — deeper entries are still found.
None and Some(0) are equivalent (yield everything).
max_filesize: Option<u64>Skip files whose size exceeds this many bytes. Files for which the
underlying WalkerFs::file_size returns None (size unknown) are
always yielded regardless of the limit.
entry_types: EntryTypesTypes of entries to include.
respect_gitignore: boolRespect .gitignore files and default ignores.
Include hidden files (starting with .).
filter: IncludeExcludeInclude/exclude filters.
follow_symlinks: boolFollow symbolic links into directories (default false).
When false, symlink directories are yielded as files rather than recursed.
When true, cycle detection prevents infinite loops.
on_error: Option<Arc<dyn Fn(&Path, &WalkerError) + Send + Sync>>Optional callback for non-fatal errors (unreadable dirs, bad .gitignore).
Default None silently skips errors (preserving original behavior).
types: Option<Arc<Types>>File-type filter using ripgrep’s ignore::types::Types.
Builds e.g. with TypesBuilder::new().add_defaults().select("rust").
Pure path-name matching — no I/O.
Trait Implementations§
Source§impl Clone for WalkOptions
impl Clone for WalkOptions
Source§fn clone(&self) -> WalkOptions
fn clone(&self) -> WalkOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for WalkOptions
impl Debug for WalkOptions
Source§impl Default for WalkOptions
impl Default for WalkOptions
Source§fn default() -> WalkOptions
fn default() -> WalkOptions
Auto Trait Implementations§
impl !RefUnwindSafe for WalkOptions
impl !UnwindSafe for WalkOptions
impl Freeze for WalkOptions
impl Send for WalkOptions
impl Sync for WalkOptions
impl Unpin for WalkOptions
impl UnsafeUnpin for WalkOptions
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> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
impl<T> OrderedSeq<'_, T> for Twhere
T: Clone,
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<'p, T> Seq<'p, T> for Twhere
T: Clone,
impl<'p, T> Seq<'p, T> for Twhere
T: Clone,
Source§impl<T, S> SpanWrap<S> for Twhere
S: WrappingSpan<T>,
impl<T, S> SpanWrap<S> for Twhere
S: WrappingSpan<T>,
Source§fn with_span(self, span: S) -> <S as WrappingSpan<Self>>::Spanned
fn with_span(self, span: S) -> <S as WrappingSpan<Self>>::Spanned
WrappingSpan::make_wrapped to wrap an AST node in a span.