pub struct WalkOptions {
pub max_depth: Option<usize>,
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) + Sync + Send>>,
}Expand description
Options for file walking.
Fields§
§max_depth: Option<usize>Maximum depth to recurse (None = unlimited).
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) + Sync + Send>>Optional callback for non-fatal errors (unreadable dirs, bad .gitignore).
Default None silently skips errors (preserving original behavior).
Trait Implementations§
Source§impl Clone for WalkOptions
impl Clone for WalkOptions
Source§fn clone(&self) -> WalkOptions
fn clone(&self) -> WalkOptions
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 WalkOptions
impl Debug for WalkOptions
Source§impl Default for WalkOptions
impl Default for WalkOptions
Source§fn default() -> WalkOptions
fn default() -> WalkOptions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for WalkOptions
impl !RefUnwindSafe for WalkOptions
impl Send for WalkOptions
impl Sync for WalkOptions
impl Unpin for WalkOptions
impl !UnwindSafe 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
Mutably borrows from an owned value. Read more