Trait aparato::traits::Properties [−][src]
pub trait Properties { 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 vendor_name(&self) -> String; fn device_name(&self) -> String; fn enabled(&self) -> bool; fn revision(&self) -> String; }
Required methods
This function returns a new instance of PCIDevice
struct using the given path
.
Examples:
use aparato::PCIDevice; use aparato::traits::*; // PCIDevice::new() can autocomplete the path to the PCIDevice // if it isn't provided. // The following statements all point to the same device. let device_1 = PCIDevice::new("00:02.0"); let device_2 = PCIDevice::new("0000:00:02.0"); let device_3 = PCIDevice::new("/sys/bus/pci/devices/0000:00:02.0");
fn class_name(&self) -> String
fn class_name(&self) -> String
This function returns the PCIDevice
class 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.