procfs 0.18.0

Interface to the linux procfs pseudo-filesystem
Documentation
1
2
3
4
5
6
7
// List partitions listed in /proc/partitions

fn main() {
    for part_entry in procfs::partitions().unwrap() {
        println!("{part_entry:?}");
    }
}