summary history branches tags files
src/main.rs
use menomonmon::{
    monitor,
    print_devices,
    read_devices,
    CliArgs,
    UsbmonDevice,
};

fn main() {
    // display all connected USB devices
    let all_devs: Vec<UsbmonDevice> = read_devices();
    print_devices(&all_devs);
    println!();

    // get optional device filter from command-line args
    let dev_filter = CliArgs::dev_filter();

    // print all USB events matching the device(s)
    monitor(Some(&dev_filter), None, None, None);
}