pub struct PciDevice { /* private fields */ }
Implementations§
Source§impl PciDevice
impl PciDevice
pub fn class(&self) -> Result<u32>
pub fn device(&self) -> Result<u16>
pub fn revision(&self) -> Result<u8>
pub fn subsystem_device(&self) -> Result<u16>
pub fn subsystem_vendor(&self) -> Result<u16>
pub fn vendor(&self) -> Result<u16>
pub fn driver(&self) -> Result<PciDriver>
pub unsafe fn remove(&self) -> Result<()>
Trait Implementations§
Source§impl RuntimePM for PciDevice
impl RuntimePM for PciDevice
fn set_runtime_pm(&self, state: RuntimePowerManagement) -> Result<()>
Source§impl SysClass for PciDevice
impl SysClass for PciDevice
Source§fn class() -> &'static str
fn class() -> &'static str
Return the class of the sys object, the name of a folder in `/sys/${base}``
Source§unsafe fn from_path_unchecked(path: PathBuf) -> Self
unsafe fn from_path_unchecked(path: PathBuf) -> Self
Create a sys object from an absolute path without checking path for validity
Source§fn dir() -> PathBuf
fn dir() -> PathBuf
Return the path to the sys objects, the full path of a folder in /sys/class
Source§fn from_path(path: &Path) -> Result<Self>
fn from_path(path: &Path) -> Result<Self>
Create a sys object from a path, checking it for validity
Source§fn iter() -> Box<dyn Iterator<Item = Result<Self>>>where
Self: 'static,
fn iter() -> Box<dyn Iterator<Item = Result<Self>>>where
Self: 'static,
Retrieve all of the object instances of a sys class, with a boxed iterator
Source§fn read_file<P: AsRef<Path>>(&self, name: P) -> Result<String>
fn read_file<P: AsRef<Path>>(&self, name: P) -> Result<String>
Read a file underneath the sys object
Source§fn parse_file<F: FromStr, P: AsRef<Path>>(&self, name: P) -> Result<F>
fn parse_file<F: FromStr, P: AsRef<Path>>(&self, name: P) -> Result<F>
Parse a number from a file underneath the sys object
Auto Trait Implementations§
impl Freeze for PciDevice
impl RefUnwindSafe for PciDevice
impl Send for PciDevice
impl Sync for PciDevice
impl Unpin for PciDevice
impl UnwindSafe for PciDevice
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more