Text of rust.docs.kernel.org › next › kernel › pci › struct.Class.html as Styx crawled it on Nov 19, 2026. The page may have changed since. Only its words are kept, without pictures or layout, and only the first part of a long page.

Open the live page

Class in kernel::pci - Rust

Skip to main content Class kernel :: pci 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) -> Self 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 Same as core::fmt::Display::fmt .

Source § impl Eq for Class Source § impl PartialEq for Class Source § fn eq (&self, other: &Self) -> bool Equality operator == . Read more 1.0.0 (const: unstable ) · Source § fn ne (&self, other: &Rhs ) -> bool Inequality operator != . Read more Source § impl StructuralPartialEq for Class Auto Trait Implementations § § impl Forget for Class § impl Freeze for Class § impl Move 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 § 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<S, T> IntoSafeCast <T> for S where T: FromSafeCast <S>, Source § fn into_safe_cast (self) -> T Convert self into a T . This operation is guaranteed to be lossless. Source § impl<S, T> IntoSafeCastArch <T> for S where T: FromSafeCastArch <S>, Source § fn into_safe_cast_arch (self) -> T Convert self into a T . This operation is guaranteed to be lossless. Source § impl<T> KnownSize for T Source § const MIN_SIZE : usize = const MIN_SIZE: usize = size_of::<T>(); Minimum size of this type known at compile-time.

Source § const MIN_ALIGN : Alignment = const MIN_ALIGN: Alignment = Alignment::of::<T>(); Minimum alignment of this type known at compile-time. 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 __init (self, slot: *mut T ) -> Result < () , ! > Initia

The rest of this page is on the live site.