pub struct Subclass { /* private fields */ }
Expand description
Represents a PCI device subclass in the PCI database.
Every subclass has a corresponding class, a subclass id, a pretty name, and a list of associated ProgIf
s.
Implementations§
Source§impl Subclass
impl Subclass
Sourcepub fn from_cid_sid(cid: u8, sid: u8) -> Option<&'static Self>
pub fn from_cid_sid(cid: u8, sid: u8) -> Option<&'static Self>
Returns the Subclass
corresponding to the given class and subclass IDs, or None
if no such device exists in the DB.
Sourcepub fn class(&self) -> &'static Class
pub fn class(&self) -> &'static Class
Returns the Class
that this subclass belongs to.
Looking up a class by subclass is cheap (O(1)
).
Sourcepub fn as_cid_sid(&self) -> (u8, u8)
pub fn as_cid_sid(&self) -> (u8, u8)
Returns a tuple of (class ID, subclass ID) for this subclass.
This is conveniont for interactions with other PCI libraries.
Trait Implementations§
impl Copy for Subclass
impl Eq for Subclass
impl StructuralPartialEq for Subclass
Auto Trait Implementations§
impl Freeze for Subclass
impl RefUnwindSafe for Subclass
impl Send for Subclass
impl Sync for Subclass
impl Unpin for Subclass
impl UnwindSafe for Subclass
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