pub fn watch(
dir: &Path,
on_change: Option<ChangeHandler>,
debounce: Option<Duration>,
) -> Result<WatchHandle>Expand description
Spawn a recursive debounced watcher on dir using the default
WatchConfig (skips conventional noise paths — .git/,
target/, node_modules/, etc.).
Returns a handle whose Drop impl tears the watcher down. Errors
surface synchronously if the path is not a directory or the platform
watcher refuses to register.
For control over the skip set, use watch_with_config.