pub struct WalkConfig {
pub root_patterns: Vec<PathBuf>,
pub file_extensions: Vec<&'static str>,
pub max_depth: Option<usize>,
pub follow_symlinks: bool,
}Expand description
Configuration for directory walking.
Fields§
§root_patterns: Vec<PathBuf>Root patterns to search (e.g., [“.claude/commands”, “commands”]).
file_extensions: Vec<&'static str>File extensions to include (e.g., [“md”, “yaml”, “json”]).
max_depth: Option<usize>Maximum depth to traverse. None means unlimited.
follow_symlinks: boolWhether to follow symbolic links.
Implementations§
Source§impl WalkConfig
impl WalkConfig
Sourcepub fn new(patterns: impl IntoIterator<Item = impl Into<PathBuf>>) -> Self
pub fn new(patterns: impl IntoIterator<Item = impl Into<PathBuf>>) -> Self
Create a new WalkConfig with specified patterns.
Sourcepub fn with_extensions(self, extensions: &[&'static str]) -> Self
pub fn with_extensions(self, extensions: &[&'static str]) -> Self
Set file extensions to include.
Sourcepub fn with_max_depth(self, depth: usize) -> Self
pub fn with_max_depth(self, depth: usize) -> Self
Set maximum depth.
Sourcepub fn with_follow_symlinks(self, follow: bool) -> Self
pub fn with_follow_symlinks(self, follow: bool) -> Self
Set whether to follow symlinks.
Trait Implementations§
Source§impl Clone for WalkConfig
impl Clone for WalkConfig
Source§fn clone(&self) -> WalkConfig
fn clone(&self) -> WalkConfig
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 WalkConfig
impl Debug for WalkConfig
Source§impl Default for WalkConfig
impl Default for WalkConfig
Source§fn default() -> WalkConfig
fn default() -> WalkConfig
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for WalkConfig
impl RefUnwindSafe for WalkConfig
impl Send for WalkConfig
impl Sync for WalkConfig
impl Unpin for WalkConfig
impl UnwindSafe for WalkConfig
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