Function corsairmi::list [−][src]
pub fn list() -> Result<Vec<PathBuf>>
List power supply device paths.
This works by reading the USB vendor ID (VID) and product ID (PID) under
/sys/class/hidraw
and comparing them to known IDs.
Typically these files are accessible without super user permissions.
Example
let mut list = corsairmi::list()?; if let Some(path) = list.pop() { let mut psu = corsairmi::PowerSupply::open(path)?; // call psu methods here } else { eprintln!("No PSUs found"); }