pub enum PciSpecializedHeader {
GenericDevice(PciGenericDeviceHeader),
PciToPciBridge(PciToPciBridgeHeader),
PciToCardbusBridge(PciToCardbusBridgeHeader),
}
Expand description
Enumeration of the supported specialized headers of PCI devices.
Variants§
GenericDevice(PciGenericDeviceHeader)
Sub-header for a generic PCI device
PciToPciBridge(PciToPciBridgeHeader)
Sub-header for PCI-to-PCI bus bridge
PciToCardbusBridge(PciToCardbusBridgeHeader)
Sub-header for PCI-to-Cardbus bus bridge
Implementations§
Source§impl PciSpecializedHeader
impl PciSpecializedHeader
Sourcepub fn length_of_subheader(header_type: u8) -> Option<usize>
pub fn length_of_subheader(header_type: u8) -> Option<usize>
Returns the length of the “sub-header” for the specified
header_type
.
Sourcepub fn read_subheader(
header_type: u8,
bytes: &[u8],
includes_common_header: bool,
) -> Result<Self, PciInfoError>
pub fn read_subheader( header_type: u8, bytes: &[u8], includes_common_header: bool, ) -> Result<Self, PciInfoError>
Reads the data of the sub-header from a memory buffer.
bytes
: specifies the slice containing the data to be readincludes_common_header
: true if the slice starts at the beginning of the common header, false if the slice contains only the sub-header data
Trait Implementations§
Source§impl Clone for PciSpecializedHeader
impl Clone for PciSpecializedHeader
Source§fn clone(&self) -> PciSpecializedHeader
fn clone(&self) -> PciSpecializedHeader
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for PciSpecializedHeader
impl RefUnwindSafe for PciSpecializedHeader
impl Send for PciSpecializedHeader
impl Sync for PciSpecializedHeader
impl Unpin for PciSpecializedHeader
impl UnwindSafe for PciSpecializedHeader
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