PCI ID Parser
This is a library that lets you use a PCI ID database, such as one shipped with Linux distros or from https://pci-ids.ucw.cz/. It can either read the locally installed file or fetch one from the website.
Usage
Read the local DB:
use Database;
let db = read.unwrap;
// Get vendor
let vendor = db.vendors.get.unwrap;
assert_eq!;
// Get device
let device = vendor.devices.get.unwrap;
assert_eq!;
// Get full device and subdevice info:
let info = db.get_device_info;
// Get class
let class = db.classes.get.unwrap;
assert_eq!;
You can also fetch the online DB:
use Database;
let db = get_online.unwrap;
Breaking changes
- 0.8.0: version vendor and device ids are now stored as integers instead of strings