Trait aparato::Fetch[][src]

pub trait Fetch {
    fn fetch() -> Vec<PCIDevice>;
fn fetch_by_class(class: DeviceClass) -> Vec<PCIDevice>;
fn fetch_gpus() -> Vec<PCIDevice>; }
Expand description

A trait that provides a set of methods which can fetch the information of multiple PCI devices all at once.

Fetch can take care of initializing PCI devices and fetching their information for you. It does this by traversing the filesystem, and getting the appropriate data of each device it finds.

Required methods

This function returns a list of available PCI devices and their information.

This function returns a list of available PCI devices of a specific class and their information.

This function returns a list of available GPUs and their information.

This essentially wraps fetch_by_class(DeviceClass::DisplayController) but masks unnecessary data from device and vendor names, for example:

  • TU117M [GeForce GTX 1650 Mobile / Max-Q] becomes GeForce GTX 1650 Mobile / Max-Q
  • NVIDIA Corporation becomes NVIDIA

Implementors