pub struct ListDirOpts<'a> {
pub depth: Option<usize>,
pub glob: Option<&'a str>,
pub dirs_only: bool,
pub relative_to: Option<&'a str>,
pub respect_gitignore: bool,
pub skip_dirs: Option<&'a [String]>,
pub include_size: bool,
pub annotate: Option<&'a AnnotateFn>,
}Expand description
Optional knobs for list_dir.
Fields§
§depth: Option<usize>Recursion depth (default 1 = flat ls; 2+ = nested tree).
glob: Option<&'a str>§dirs_only: bool§relative_to: Option<&'a str>§respect_gitignore: boolRespect .gitignore / .git/info/exclude rules (default true).
skip_dirs: Option<&'a [String]>Custom directory names to skip. When None, a built-in list
(.git, node_modules, target, …) is used.
include_size: bool§annotate: Option<&'a AnnotateFn>Per-entry annotation callback. Receives the entry’s path
relative to relative_to (or the root if unset) and returns
Some(annotation) to append after the entry, or None to skip.
Used by the Python wrapper to bridge a Python callable.
Trait Implementations§
Source§impl<'a> Default for ListDirOpts<'a>
impl<'a> Default for ListDirOpts<'a>
Source§fn default() -> ListDirOpts<'a>
fn default() -> ListDirOpts<'a>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<'a> Freeze for ListDirOpts<'a>
impl<'a> !RefUnwindSafe for ListDirOpts<'a>
impl<'a> !Send for ListDirOpts<'a>
impl<'a> !Sync for ListDirOpts<'a>
impl<'a> Unpin for ListDirOpts<'a>
impl<'a> UnsafeUnpin for ListDirOpts<'a>
impl<'a> !UnwindSafe for ListDirOpts<'a>
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