Struct kernel::pci::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.as_ref(),
        "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 copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
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

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

impl PartialEq for Class

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Copy for Class

source§

impl Eq for Class

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 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
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> 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
source§

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

§

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>,

§

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> Writer for T
where T: Debug,

source§

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

Formats the value using the given formatter.