pub trait PciCapability:
Send
+ Sync
+ Inspect
+ ProtobufSaveRestore {
// Required methods
fn label(&self) -> &str;
fn capability_id(&self) -> CapabilityId;
fn len(&self) -> usize;
fn read_u32(&self, offset: u16) -> u32;
fn write_u32(&mut self, offset: u16, val: u32);
fn reset(&mut self);
// Provided methods
fn as_pci_express(&self) -> Option<&PciExpressCapability> { ... }
fn as_pci_express_mut(&mut self) -> Option<&mut PciExpressCapability> { ... }
}Expand description
A generic PCI configuration space capability structure.
Required Methods§
Sourcefn capability_id(&self) -> CapabilityId
fn capability_id(&self) -> CapabilityId
Returns the PCI capability ID for this capability
Provided Methods§
Sourcefn as_pci_express(&self) -> Option<&PciExpressCapability>
fn as_pci_express(&self) -> Option<&PciExpressCapability>
Downcast to PCI Express capability
Sourcefn as_pci_express_mut(&mut self) -> Option<&mut PciExpressCapability>
fn as_pci_express_mut(&mut self) -> Option<&mut PciExpressCapability>
Downcast to PCI Express capability (mutable)