pub struct Bdf(/* private fields */);
Expand description
Unique identifier of a PCI device
BDF stands for bus, device, function, which is the standard way to identify and address individual PCI devices on a system.
Internally this is a newtype around a u32, with the BDF fields packed in such a way that the can be used to easily construct PCI configuration addresses.
Implementations§
Source§impl Bdf
impl Bdf
Sourcepub const fn new(bus: u8, device: u8, function: u8) -> Self
pub const fn new(bus: u8, device: u8, function: u8) -> Self
Constructs a new BDF value from individual components.
The valid range for bus
is 0..=255, for device
is 0..=31, and for
function
is 0..=7. This function will silently truncate any extra leading
bits from the device
and function
parameters before constructing the
final BDF value.
Trait Implementations§
impl Copy for Bdf
impl Eq for Bdf
impl StructuralPartialEq for Bdf
Auto Trait Implementations§
impl Freeze for Bdf
impl RefUnwindSafe for Bdf
impl Send for Bdf
impl Sync for Bdf
impl Unpin for Bdf
impl UnwindSafe for Bdf
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