Skip to main content

watch

Function watch 

Source
pub fn watch(
    dir: &Path,
    on_change: Option<ChangeHandler>,
    debounce: Option<Duration>,
) -> Result<WatchHandle>
Expand description

Spawn a recursive debounced watcher on dir.

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.