use vnstat_parse::{Error, Vnstat}; fn main() -> Result<(), Error> { // supply the name of the desired interface let vnstat_data = Vnstat::get("eno1")?; println!("{:?}", vnstat_data); println!( "Total network traffic for today: {} {}", vnstat_data.day_total, vnstat_data.day_total_unit ); Ok(()) }