pub struct WatchConfig {
pub skip_substrings: Vec<String>,
pub skip_extensions: Vec<String>,
}Expand description
Configuration for a watch_with_config call. Controls which
events reach the callback.
Fields§
§skip_substrings: Vec<String>Substrings to skip. A path containing any of these (anywhere) is dropped before the callback fires. Matching is case-sensitive and allocation-free.
skip_extensions: Vec<String>File extensions (without leading dot) to skip. Matching uses
the path’s last extension via Path::extension and is
case-sensitive.
Implementations§
Source§impl WatchConfig
impl WatchConfig
Sourcepub fn unfiltered() -> Self
pub fn unfiltered() -> Self
Empty skip set — every event reaches the callback. Use when
you genuinely want raw FS events (test fixtures, log-every-
change diagnostic modes, or future consumers with a reason to
see .git/objects/... writes).
Sourcepub fn is_skipped(&self, path: &Path) -> bool
pub fn is_skipped(&self, path: &Path) -> bool
Test a path against the active skip set. true → skip; false
→ forward to callback. Public so consumers building their own
orchestration over the same conventions can reuse the predicate
without re-deriving it.
Trait Implementations§
Source§impl Clone for WatchConfig
impl Clone for WatchConfig
Source§fn clone(&self) -> WatchConfig
fn clone(&self) -> WatchConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for WatchConfig
impl Debug for WatchConfig
Source§impl Default for WatchConfig
impl Default for WatchConfig
Source§fn default() -> Self
fn default() -> Self
The recommended default: skip DEFAULT_SKIP_SUBSTRINGS +
DEFAULT_SKIP_EXTENSIONS. Most consumers want this — see
unfiltered for the escape hatch.