A pci.ids-compliant library for getting information about available PCI devices.
Usage
Add the following to your project's Cargo.toml file:
aparato = "3.0.0"
Examples
use aparato::PCIDevice;
use aparato::classes::DeviceClass;
use aparato::traits::*;
fn main() {
let device: PCIDevice = PCIDevice::new("0000:00:02.0");
println!("Class Name: {}", device.class_name()); println!("Vendor Name: {}", device.vendor_name()); println!("Device Name: {}", device.device_name());
let detailed_list: Vec<PCIDevice> = PCIDevice::fetch();
println!("{:?}", detailed_list);
let thing: Vec<PCIDevice> = PCIDevice::fetch_by_class(DeviceClass::NetworkController);
println!("{:?}", thing);
}
Platform |
Support |
Linux |
✓ |
Windows |
|
macOS |
|
NetBSD |
|
aparato is still a work in progress.