pci-ids

Crates.iopci-ids
lib.rspci-ids
version0.2.5
sourcesrc
created_at2022-01-04 15:18:01.369017
updated_at2022-11-25 14:13:26.204305
descriptionRust wrappers for the PCI ID Repository
homepagehttps://github.com/lienching/pci-ids.rs
repositoryhttps://github.com/lienching/pci-ids.rs
max_upload_size
id507822
size1,369,599
Charles Lien (lienching)

documentation

README

pci-ids

This project is modified from wooduffw's usb-ids.rs (https://github.com/woodruffw/usb-ids.rs)

license Build Status Crates.io

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.

Usage

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());
    }
}
Commit count: 32

cargo fmt