Skip to main content

maybe_watch

Function maybe_watch 

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

Spawn the framework’s debounced filesystem watcher when the mode requires one. Returns the handle (drop to stop watching) or None if dir is None — useful for let _watch = …; bindings in downstream main fns.