Function run

Source
pub async fn run(
    anotify: Anotify,
    output: Option<Sender<Event>>,
    shutdown: impl Future,
) -> Result<()>
Expand description

Start a inotify server to monitor files change. When catch shutdown result, or some error were caused, quit.

You’d better define a output to recv all events, if not, the result would be print to stdout like:

println!("{:?}: {:?}", event.mask(), event.path());