Skip to main content

Class

Struct Class 

Source
pub struct Class(/* private fields */);
Expand description

PCI device class codes.

Each entry contains the full 24-bit PCI class code (base class in bits 23-16, subclass in bits 15-8, programming interface in bits 7-0).

§Examples

fn probe_device(pdev: &pci::Device<Core<'_>>) -> Result {
    let pci_class = pdev.pci_class();
    dev_info!(
        pdev,
        "Detected PCI class: {}\n",
        pci_class
    );
    Ok(())
}

Implementations§

Source§

impl Class

Once constructed, a Class contains a valid PCI class code.

Source

pub const fn as_raw(self) -> u32

Get the raw 24-bit class code value.

Source§

impl Class

Source

pub const NOT_DEFINED: Self

Source

pub const NOT_DEFINED_VGA: Self

Source

pub const STORAGE_SCSI: Self

Source

pub const STORAGE_IDE: Self

Source

pub const STORAGE_FLOPPY: Self

Source

pub const STORAGE_IPI: Self

Source

pub const STORAGE_RAID: Self

Source

pub const STORAGE_SATA: Self

Source

pub const STORAGE_SATA_AHCI: Self

Source

pub const STORAGE_SAS: Self

Source

pub const STORAGE_EXPRESS: Self

Source

pub const STORAGE_OTHER: Self

Source

pub const NETWORK_ETHERNET: Self

Source

pub const NETWORK_TOKEN_RING: Self

Source

pub const NETWORK_FDDI: Self

Source

pub const NETWORK_ATM: Self

Source

pub const NETWORK_OTHER: Self

Source

pub const DISPLAY_VGA: Self

Source

pub const DISPLAY_XGA: Self

Source

pub const DISPLAY_3D: Self

Source

pub const DISPLAY_OTHER: Self

Source

pub const MULTIMEDIA_VIDEO: Self

Source

pub const MULTIMEDIA_AUDIO: Self

Source

pub const MULTIMEDIA_PHONE: Self

Source

pub const MULTIMEDIA_HD_AUDIO: Self

Source

pub const MULTIMEDIA_OTHER: Self

Source

pub const MEMORY_RAM: Self

Source

pub const MEMORY_FLASH: Self

Source

pub const MEMORY_CXL: Self

Source

pub const MEMORY_OTHER: Self

Source

pub const BRIDGE_HOST: Self

Source

pub const BRIDGE_ISA: Self

Source

pub const BRIDGE_EISA: Self

Source

pub const BRIDGE_MC: Self

Source

pub const BRIDGE_PCI_NORMAL: Self

Source

pub const BRIDGE_PCI_SUBTRACTIVE: Self

Source

pub const BRIDGE_PCMCIA: Self

Source

pub const BRIDGE_NUBUS: Self

Source

pub const BRIDGE_CARDBUS: Self

Source

pub const BRIDGE_RACEWAY: Self

Source

pub const BRIDGE_OTHER: Self

Source

pub const COMMUNICATION_SERIAL: Self

Source

pub const COMMUNICATION_PARALLEL: Self

Source

pub const COMMUNICATION_MULTISERIAL: Self

Source

pub const COMMUNICATION_MODEM: Self

Source

pub const COMMUNICATION_OTHER: Self

Source

pub const SYSTEM_PIC: Self

Source

pub const SYSTEM_PIC_IOAPIC: Self

Source

pub const SYSTEM_PIC_IOXAPIC: Self

Source

pub const SYSTEM_DMA: Self

Source

pub const SYSTEM_TIMER: Self

Source

pub const SYSTEM_RTC: Self

Source

pub const SYSTEM_PCI_HOTPLUG: Self

Source

pub const SYSTEM_SDHCI: Self

Source

pub const SYSTEM_RCEC: Self

Source

pub const SYSTEM_OTHER: Self

Source

pub const INPUT_KEYBOARD: Self

Source

pub const INPUT_PEN: Self

Source

pub const INPUT_MOUSE: Self

Source

pub const INPUT_SCANNER: Self

Source

pub const INPUT_GAMEPORT: Self

Source

pub const INPUT_OTHER: Self

Source

pub const DOCKING_GENERIC: Self

Source

pub const DOCKING_OTHER: Self

Source

pub const PROCESSOR_386: Self

Source

pub const PROCESSOR_486: Self

Source

pub const PROCESSOR_PENTIUM: Self

Source

pub const PROCESSOR_ALPHA: Self

Source

pub const PROCESSOR_POWERPC: Self

Source

pub const PROCESSOR_MIPS: Self

Source

pub const PROCESSOR_CO: Self

Source

pub const SERIAL_FIREWIRE: Self

Source

pub const SERIAL_FIREWIRE_OHCI: Self

Source

pub const SERIAL_ACCESS: Self

Source

pub const SERIAL_SSA: Self

Source

pub const SERIAL_USB_UHCI: Self

Source

pub const SERIAL_USB_OHCI: Self

Source

pub const SERIAL_USB_EHCI: Self

Source

pub const SERIAL_USB_XHCI: Self

Source

pub const SERIAL_USB_CDNS: Self

Source

pub const SERIAL_USB_DEVICE: Self

Source

pub const SERIAL_FIBER: Self

Source

pub const SERIAL_SMBUS: Self

Source

pub const SERIAL_IPMI_SMIC: Self

Source

pub const SERIAL_IPMI_KCS: Self

Source

pub const SERIAL_IPMI_BT: Self

Source

pub const WIRELESS_RF_CONTROLLER: Self

Source

pub const WIRELESS_WHCI: Self

Source

pub const INTELLIGENT_I2O: Self

Source

pub const SATELLITE_TV: Self

Source

pub const SATELLITE_AUDIO: Self

Source

pub const SATELLITE_VOICE: Self

Source

pub const SATELLITE_DATA: Self

Source

pub const CRYPT_NETWORK: Self

Source

pub const CRYPT_ENTERTAINMENT: Self

Source

pub const CRYPT_OTHER: Self

Source

pub const SP_DPIO: Self

Source

pub const SP_OTHER: Self

Source

pub const ACCELERATOR_PROCESSING: Self

Source

pub const OTHERS: Self

Trait Implementations§

Source§

impl Clone for Class

Source§

fn clone(&self) -> Class

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for Class

Source§

impl Debug for Class

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for Class

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Source§

impl Eq for Class

Source§

impl PartialEq for Class

Source§

fn eq(&self, other: &Class) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for Class

Auto Trait Implementations§

§

impl Freeze for Class

§

impl RefUnwindSafe for Class

§

impl Send for Class

§

impl Sync for Class

§

impl Unpin for Class

§

impl UnsafeUnpin for Class

§

impl UnwindSafe for Class

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Init<T> for T

Source§

unsafe fn __init(self, slot: *mut T) -> Result<(), Infallible>

Initializes slot. Read more
Source§

fn chain<F>(self, f: F) -> ChainInit<Self, F, T, E>
where F: FnOnce(&mut T) -> Result<(), E>,

First initializes the value using self then calls the function f with the initialized value. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> KnownSize for T

Source§

fn size(_: *const T) -> usize

Get the size of an object of this type in bytes, with the metadata of the given pointer.
Source§

impl<T> PinInit<T> for T

Source§

unsafe fn __pinned_init(self, slot: *mut T) -> Result<(), Infallible>

Initializes slot. Read more
Source§

fn pin_chain<F>(self, f: F) -> ChainPinInit<Self, F, T, E>
where F: FnOnce(Pin<&mut T>) -> Result<(), E>,

First initializes the value using self then calls the function f with the initialized value. Read more
§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T, U, const N: u32> TryIntoBounded<T, N> for U
where T: Integer, U: TryInto<T>,

Source§

fn try_into_bounded(self) -> Option<Bounded<T, N>>

Attempts to convert self into a Bounded using N bits. Read more
Source§

impl<T> Writer for T
where T: Debug,

Source§

fn write(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter.