pub struct DeviceId(/* private fields */);
Expand description
Abstraction for the PCI device ID structure (struct pci_device_id
).
Implementations§
Source§impl DeviceId
impl DeviceId
Sourcepub const fn from_id(vendor: u32, device: u32) -> Self
pub const fn from_id(vendor: u32, device: u32) -> Self
Equivalent to C’s PCI_DEVICE
macro.
Create a new pci::DeviceId
from a vendor and device ID number.
Sourcepub const fn from_class(class: u32, class_mask: u32) -> Self
pub const fn from_class(class: u32, class_mask: u32) -> Self
Equivalent to C’s PCI_DEVICE_CLASS
macro.
Create a new pci::DeviceId
from a class number and mask.
Trait Implementations§
Source§impl RawDeviceId for DeviceId
impl RawDeviceId for DeviceId
Source§impl RawDeviceIdIndex for DeviceId
impl RawDeviceIdIndex for DeviceId
Source§const DRIVER_DATA_OFFSET: usize = 24usize
const DRIVER_DATA_OFFSET: usize = 24usize
The offset (in bytes) to the context/data field in the raw device ID.
Source§fn index(&self) -> usize
fn index(&self) -> usize
The index stored at
DRIVER_DATA_OFFSET
of the implementor of the RawDeviceIdIndex
trait.impl Copy for DeviceId
Auto Trait Implementations§
impl Freeze for DeviceId
impl RefUnwindSafe for DeviceId
impl Send for DeviceId
impl Sync for DeviceId
impl Unpin for DeviceId
impl UnwindSafe for DeviceId
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> PinInit<T> for T
impl<T> PinInit<T> for T
Source§unsafe fn __pinned_init(self, slot: *mut T) -> Result<(), Infallible>
unsafe fn __pinned_init(self, slot: *mut T) -> Result<(), Infallible>
Initializes
slot
. Read more