pub struct PciScanner<A: ConfigAccess> {
access: A,
}Expand description
PCI bus scanner.
Fields§
§access: AImplementations§
Source§impl<A: ConfigAccess> PciScanner<A>
impl<A: ConfigAccess> PciScanner<A>
Sourcepub fn new(access: A) -> Self
pub fn new(access: A) -> Self
Create a new PCI scanner with the given configuration access method.
Sourcepub fn probe(&self, location: DeviceFunction) -> Option<PciDeviceInfo>
pub fn probe(&self, location: DeviceFunction) -> Option<PciDeviceInfo>
Probe a single device/function.
Returns Some(info) if a device is present, None otherwise.
Sourcepub fn scan_bus(&self, bus: u8) -> Vec<PciDeviceInfo>
pub fn scan_bus(&self, bus: u8) -> Vec<PciDeviceInfo>
Scan a single bus for devices.
Sourcepub fn scan_all(&self) -> Vec<PciDeviceInfo>
pub fn scan_all(&self) -> Vec<PciDeviceInfo>
Scan all buses for devices (simple linear scan).
Sourcepub fn find_virtio_net(&self) -> Vec<PciDeviceInfo>
pub fn find_virtio_net(&self) -> Vec<PciDeviceInfo>
Find all VirtIO network devices.
Sourcepub fn find_network(&self) -> Vec<PciDeviceInfo>
pub fn find_network(&self) -> Vec<PciDeviceInfo>
Find all network devices (any vendor).
Auto Trait Implementations§
impl<A> Freeze for PciScanner<A>where
A: Freeze,
impl<A> RefUnwindSafe for PciScanner<A>where
A: RefUnwindSafe,
impl<A> Send for PciScanner<A>where
A: Send,
impl<A> Sync for PciScanner<A>where
A: Sync,
impl<A> Unpin for PciScanner<A>where
A: Unpin,
impl<A> UnwindSafe for PciScanner<A>where
A: UnwindSafe,
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