Options

Struct Options 

Source
pub(crate) struct Options {
Show 21 fields pub(crate) dry_run: bool, pub(crate) verbose: bool, pub(crate) hidden: bool, pub(crate) max_depth: i32, pub(crate) size_filter: SizeFilter, pub(crate) mtime_filter: TimeFilter, pub(crate) perm_filter: String, pub(crate) user_filter: String, pub(crate) group_filter: String, pub(crate) type_filter: char, pub(crate) exclude_pattern: String, pub(crate) stop_on_error: bool, pub(crate) confirm: bool, pub(crate) jobs: i32, pub(crate) shell: String, pub(crate) shell_name: String, pub(crate) collect_all: bool, pub(crate) glob: bool, pub(crate) regex_match: bool, pub(crate) glob_exclude: bool, pub(crate) expr_str: String,
}
Expand description

Aggregated runtime options parsed from CLI arguments.

This is a flattened, validated view of Cli that the rest of the program operates on. Filters that weren’t specified on the command line have their active flag set to false or their string fields left empty.

Fields§

§dry_run: bool

Print commands without executing them.

§verbose: bool

Print each command to stdout before executing it.

§hidden: bool

Include hidden (dot-prefixed) files and directories.

§max_depth: i32

Maximum recursion depth (-1 = unlimited, 0 = current dir only).

§size_filter: SizeFilter

Optional size filter (e.g., +10M).

§mtime_filter: TimeFilter

Optional modification-time filter (e.g., +7).

§perm_filter: String

Octal permission string for filtering (e.g., "755"). Empty = disabled.

§user_filter: String

Owner username to filter by. Empty = disabled.

§group_filter: String

Group name to filter by. Empty = disabled.

§type_filter: char

Type filter character: 'f' (file), 'd' (dir), 'l' (symlink), '\0' = disabled.

§exclude_pattern: String

Regex pattern string for excluding entries. Empty = disabled.

§stop_on_error: bool

Halt processing on the first command that returns non-zero.

§confirm: bool

Prompt the user for y/N confirmation before each command.

§jobs: i32

Number of parallel child processes (1 = sequential, >1 = fork pool).

§shell: String

Shell path to use for command execution (default: /bin/bash).

§shell_name: String§collect_all: bool

If true (via -l/--list-all), collect all matched file paths and run one command with %0 expanded to the combined space-delimited list.

§glob: bool

If true (via -b/--glob), treat patterns as globs instead of regex.

§regex_match: bool

If true (via -z/--regex-match), the regex must match the entire path (anchored with ^(?:...)$) rather than just a substring.

§glob_exclude: bool

If true (via -i/--glob-exclude), treat the exclude pattern as a glob instead of regex.

§expr_str: String

Expression filter string from --expr.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.