sysfs-class 0.1.3

Rust library for viewing /sys/class in an object-oriented format
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use std::io;
use sysfs_class::{ScsiHost, SysClass};

fn main() -> io::Result<()> {
    for host in ScsiHost::all()? {
        println!(
            "{} has power management policy \"{:?}\"",
            host.id(),
            host.link_power_management_policy()
        );
    }

    Ok(())
}