pub struct PciDeviceId {
pub vendor: u16,
pub device: u16,
pub subvendor: u16,
pub subdevice: u16,
pub class: u32,
pub class_mask: u32,
}Expand description
PCI device ID for driver matching
Fields§
§vendor: u16Vendor ID (or 0xFFFF for any)
device: u16Device ID (or 0xFFFF for any)
subvendor: u16Subvendor ID (or 0xFFFF for any)
subdevice: u16Subdevice ID (or 0xFFFF for any)
class: u32Class code (or 0xFFFFFF for any)
class_mask: u32Class mask (which bits of class to match)
Implementations§
Source§impl PciDeviceId
impl PciDeviceId
Sourcepub const fn from_class(class: u32, mask: u32) -> Self
pub const fn from_class(class: u32, mask: u32) -> Self
Create a matcher for a specific class
Sourcepub fn matches(&self, device: &PciDeviceInfo) -> bool
pub fn matches(&self, device: &PciDeviceInfo) -> bool
Check if this ID matches a PCI device
Trait Implementations§
Source§impl Clone for PciDeviceId
impl Clone for PciDeviceId
Source§fn clone(&self) -> PciDeviceId
fn clone(&self) -> PciDeviceId
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PciDeviceId
impl Debug for PciDeviceId
Source§impl PartialEq for PciDeviceId
impl PartialEq for PciDeviceId
impl Copy for PciDeviceId
impl Eq for PciDeviceId
impl StructuralPartialEq for PciDeviceId
Auto Trait Implementations§
impl Freeze for PciDeviceId
impl RefUnwindSafe for PciDeviceId
impl Send for PciDeviceId
impl Sync for PciDeviceId
impl Unpin for PciDeviceId
impl UnwindSafe for PciDeviceId
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)§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.