Trait pci_core::capabilities::PciCapability

source ·
pub trait PciCapability:
    Send
    + Sync
    + Inspect
    + ProtobufSaveRestore {
    // Required methods
    fn label(&self) -> &str;
    fn len(&self) -> usize;
    fn read_u32(&self, offset: u16) -> u32;
    fn write_u32(&mut self, offset: u16, val: u32);
    fn reset(&mut self);
}
Expand description

A generic PCI configuration space capability structure.

Required Methods§

source

fn label(&self) -> &str

A descriptive label for use in Save/Restore + Inspect output

source

fn len(&self) -> usize

Length of the capability structure

source

fn read_u32(&self, offset: u16) -> u32

Read a u32 at the given offset

source

fn write_u32(&mut self, offset: u16, val: u32)

Write a u32 at the given offset

source

fn reset(&mut self)

Reset the capability

Implementors§

source§

impl<T> PciCapability for ReadOnlyCapability<T>
where T: AsBytes + Send + Sync + Debug,