Trait aparato::Device [−][src]
pub trait Device {}Show 17 methods
fn new(path: &str) -> Self; fn path(&self) -> PathBuf; fn address(&self) -> String; fn class_id(&self) -> Vec<u8>; fn vendor_id(&self) -> Vec<u8>; fn device_id(&self) -> Vec<u8>; 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) -> Vec<u8>; fn subsystem_name(&self) -> String; fn subsystem_vendor_id(&self) -> Vec<u8>; fn subsystem_device_id(&self) -> Vec<u8>;
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}; // 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
class ID.
The return value is a decoded hexadecimal value.
This function returns the PCIDevice
vendor ID.
The return value is a decoded hexadecimal value.
This function returns the PCIDevice
device ID.
The return value is a decoded hexadecimal value.
fn class_name(&self) -> String
fn class_name(&self) -> String
This function returns the PCIDevice
class name.
fn subclass_name(&self) -> String
fn subclass_name(&self) -> String
This function returns the PCIDevice
subclass name.
fn vendor_name(&self) -> String
fn vendor_name(&self) -> String
This function returns the PCIDevice
vendor name.
fn device_name(&self) -> String
fn device_name(&self) -> String
This function returns the PCIDevice
device name.
fn d3cold_allowed(&self) -> bool
fn d3cold_allowed(&self) -> bool
This function returns whether the PCIDevice
is enabled.
This function returns whether the PCIDevice
is enabled.
The return value is a decoded hexadecimal value.
fn subsystem_name(&self) -> String
fn subsystem_name(&self) -> String
This function returns the PCIDevice
subsystem vendor.
fn subsystem_vendor_id(&self) -> Vec<u8>
fn subsystem_vendor_id(&self) -> Vec<u8>
This function returns the PCIDevice
subsystem vendor.
The return value is a decoded hexadecimal value.
fn subsystem_device_id(&self) -> Vec<u8>
fn subsystem_device_id(&self) -> Vec<u8>
This function returns the PCIDevice
subsystem vendor.
The return value is a decoded hexadecimal value.