mirror of https://github.com/chipsenkbeil/distant
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
719 B
Rust
29 lines
719 B
Rust
1 year ago
|
use std::time::Duration;
|
||
|
|
||
|
#[derive(Clone, Debug, Default, PartialEq, Eq)]
|
||
|
pub struct Config {
|
||
|
pub watch: WatchConfig,
|
||
|
}
|
||
|
|
||
|
/// Configuration specifically for watching files and directories.
|
||
|
#[derive(Clone, Debug, PartialEq, Eq)]
|
||
|
pub struct WatchConfig {
|
||
|
pub native: bool,
|
||
|
pub poll_interval: Option<Duration>,
|
||
|
pub compare_contents: bool,
|
||
|
pub debounce_timeout: Duration,
|
||
|
pub debounce_tick_rate: Option<Duration>,
|
||
|
}
|
||
|
|
||
|
impl Default for WatchConfig {
|
||
|
fn default() -> Self {
|
||
|
Self {
|
||
|
native: true,
|
||
|
poll_interval: None,
|
||
|
compare_contents: false,
|
||
|
debounce_timeout: Duration::from_millis(500),
|
||
|
debounce_tick_rate: None,
|
||
|
}
|
||
|
}
|
||
|
}
|