Struct watchexec::config::Config[][src]

#[non_exhaustive]
pub struct Config {
Show fields pub cmd: Vec<String>, pub paths: Vec<PathBuf>, pub filters: Vec<String>, pub ignores: Vec<String>, pub clear_screen: bool, pub signal: Option<String>, pub on_busy_update: OnBusyUpdate, pub debounce: Duration, pub run_initially: bool, pub shell: Shell, pub no_meta: bool, pub no_environment: bool, pub no_vcs_ignore: bool, pub no_ignore: bool, pub poll: bool, pub poll_interval: Duration, pub use_process_group: bool, // some fields omitted
}
Expand description

Arguments to the watcher

Fields (Non-exhaustive)

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
cmd: Vec<String>

Command to execute.

When shell is Shell::None, this is expected to be in “execvp(3)” format: first program, rest arguments. Otherwise, all elements will be joined together with a single space and passed to the shell. More control can then be obtained by providing a 1-element vec, and doing your own joining and/or escaping there.

paths: Vec<PathBuf>

List of paths to watch for changes.

filters: Vec<String>

Positive filters (trigger only on matching changes). Glob format.

ignores: Vec<String>

Negative filters (do not trigger on matching changes). Glob format.

clear_screen: bool

Clear the screen before each run.

signal: Option<String>

If Some, send that signal (e.g. SIGHUP) to the command on change.

on_busy_update: OnBusyUpdate

Specify what to do when receiving updates while the command is running.

debounce: Duration

Interval to debounce the changes.

run_initially: bool

Run the commands right after starting.

shell: Shell

Specify the shell to use.

no_meta: bool

Ignore metadata changes.

no_environment: bool

Do not set WATCHEXEC_*_PATH environment variables for the process.

no_vcs_ignore: bool

Skip auto-loading .gitignore files

no_ignore: bool

Skip auto-loading .ignore files

poll: bool

Force using the polling backend.

poll_interval: Duration

Interval for polling.

use_process_group: bool

Whether to use a process group to run the command.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.