File: if_watch.rs

package info (click to toggle)
rust-if-watch 3.2.1-9
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 224 kB
  • sloc: makefile: 16; sh: 1
file content (13 lines) | stat: -rw-r--r-- 304 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
use futures::StreamExt;
use if_watch::smol::IfWatcher;

fn main() {
    env_logger::init();
    smol::block_on(async {
        let mut set = IfWatcher::new().unwrap();
        loop {
            let event = set.select_next_some().await;
            println!("Got event {:?}", event);
        }
    });
}