pub struct PciDeviceInfo {
pub location: DeviceFunction,
pub vendor_id: u16,
pub device_id: u16,
pub class: u8,
pub subclass: u8,
pub prog_if: u8,
pub revision: u8,
pub header_type: u8,
pub multifunction: bool,
}Expand description
PCI device information from configuration space.
Fields§
§location: DeviceFunctionDevice location.
vendor_id: u16Vendor ID.
device_id: u16Device ID.
class: u8Class code.
subclass: u8Subclass code.
prog_if: u8Programming interface.
revision: u8Revision ID.
header_type: u8Header type (0 = standard, 1 = bridge, 2 = cardbus).
multifunction: boolMulti-function device flag.
Implementations§
Source§impl PciDeviceInfo
impl PciDeviceInfo
Sourcepub fn is_virtio_net(&self) -> bool
pub fn is_virtio_net(&self) -> bool
Check if this is a VirtIO network device. Supports both transitional (0x1000) and modern (0x1041) device IDs, as well as class-based detection (class 0x02 = network).
Sourcepub fn is_network(&self) -> bool
pub fn is_network(&self) -> bool
Check if this is a network device (class 0x02).
Sourcepub fn virtio_device_type(&self) -> Option<u8>
pub fn virtio_device_type(&self) -> Option<u8>
Get VirtIO device type (for transitional devices).
Trait Implementations§
Source§impl Clone for PciDeviceInfo
impl Clone for PciDeviceInfo
Source§fn clone(&self) -> PciDeviceInfo
fn clone(&self) -> PciDeviceInfo
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PciDeviceInfo
impl Debug for PciDeviceInfo
impl Copy for PciDeviceInfo
Auto Trait Implementations§
impl Freeze for PciDeviceInfo
impl RefUnwindSafe for PciDeviceInfo
impl Send for PciDeviceInfo
impl Sync for PciDeviceInfo
impl Unpin for PciDeviceInfo
impl UnwindSafe for PciDeviceInfo
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