Crates.io | pci-ids |
lib.rs | pci-ids |
version | 0.2.5 |
source | src |
created_at | 2022-01-04 15:18:01.369017 |
updated_at | 2022-11-25 14:13:26.204305 |
description | Rust wrappers for the PCI ID Repository |
homepage | https://github.com/lienching/pci-ids.rs |
repository | https://github.com/lienching/pci-ids.rs |
max_upload_size | |
id | 507822 |
size | 1,369,599 |
Cross-platform Rust wrappers for the PCI ID Repository.
This library bundles the PCI ID database, allowing platforms other than Linux to query it as a source of canonical PCI metadata.
Iterating over all known vendors:
use pci_ids::Vendors;
for vendor in Vendors::iter() {
for device in vendor.devices() {
println!("vendor: {}, device: {}", vendor.name(), device.name());
}
}
Iterating over all known subclasses:
use pci_ids::Classes;
for class in Classes::iter() {
for subclass in class.subclasses() {
println!("class: {}, subclass: {}", class.name(), subclass.name());
}
}