Trait aparato::Device[][src]

pub trait Device {
Show methods fn new(path: &str) -> Self;
fn path(&self) -> PathBuf;
fn address(&self) -> String;
fn class_id(&self) -> String;
fn vendor_id(&self) -> String;
fn device_id(&self) -> String;
fn numa_node(&self) -> isize;
fn class_name(&self) -> String;
fn subclass_name(&self) -> String;
fn vendor_name(&self) -> String;
fn device_name(&self) -> String;
fn enabled(&self) -> bool;
fn d3cold_allowed(&self) -> bool;
fn revision(&self) -> String;
fn subsystem_name(&self) -> String;
fn subsystem_vendor_id(&self) -> String;
fn subsystem_device_id(&self) -> String;
}
Expand description

A trait that provides the necessary methods which can initialize a single PCIDevice and fetch its information.

Required methods

This function returns a new instance of PCIDevice struct using the given path.

Examples

use aparato::{Device, PCIDevice};

// PCIDevice::new() can autocomplete the path to the PCIDevice
// if it isn't provided.

// foo, bar and baz all point to the same device.
let foo = PCIDevice::new("00:04.0");
let bar = PCIDevice::new("0000:00:04.0");
let baz = PCIDevice::new("/sys/bus/pci/devices/0000:00:04.0");

This function returns the PCIDevice path.

This function returns the PCIDevice address.

This function returns the PCIDevice class ID.

This function returns the PCIDevice vendor ID.

This function returns the PCIDevice device ID.

This function returns the PCIDevice NUMA node.

This function returns the PCIDevice class name.

This function returns the PCIDevice subclass name.

This function returns the PCIDevice vendor name.

This function returns the PCIDevice device name.

This function returns whether the PCIDevice is enabled.

This function returns whether the PCIDevice is enabled.

This function returns whether the PCIDevice is enabled.

This function returns the PCIDevice subsystem vendor.

This function returns the PCIDevice subsystem vendor.

This function returns the PCIDevice subsystem vendor.

Implementors