pub struct PciDevice {Show 15 fields
pub location: PciLocation,
pub vendor_id: u16,
pub device_id: u16,
pub class_code: u8,
pub subclass: u8,
pub prog_if: u8,
pub revision: u8,
pub header_type: u8,
pub interrupt_line: u8,
pub interrupt_pin: u8,
pub bars: Vec<PciBar>,
pub enabled: bool,
pub msi: Option<MsiCapability>,
pub msix: Option<MsixCapability>,
pub secondary_bus: Option<u8>,
}Expand description
PCI device representation
Fields§
§location: PciLocation§vendor_id: u16§device_id: u16§class_code: u8§subclass: u8§prog_if: u8§revision: u8§header_type: u8§interrupt_line: u8§interrupt_pin: u8§bars: Vec<PciBar>§enabled: bool§msi: Option<MsiCapability>MSI capability, if present.
msix: Option<MsixCapability>MSI-X capability, if present.
secondary_bus: Option<u8>Secondary bus number (only valid for PCI-to-PCI bridges, header type 1).
Implementations§
Source§impl PciDevice
impl PciDevice
Sourcepub fn new(location: PciLocation) -> Self
pub fn new(location: PciLocation) -> Self
Create a new PCI device
Sourcepub fn get_device_class(&self) -> DeviceClass
pub fn get_device_class(&self) -> DeviceClass
Get device class
Sourcepub fn is_multifunction(&self) -> bool
pub fn is_multifunction(&self) -> bool
Check if device is multifunction
Trait Implementations§
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§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)