pub trait ExtendedCapability<'a>:
PciRegion
+ AsPciSubregion<'a>
+ Clone
+ Copy
+ Debug
+ Sized {
// Required methods
fn backed_by(as_subregion: impl AsPciSubregion<'a>) -> Result<Option<Self>>;
fn header(&self) -> ExtendedCapabilityHeader<'a>;
}Expand description
Some specific type of PCI Extended Capability.
Required Methods§
Sourcefn backed_by(as_subregion: impl AsPciSubregion<'a>) -> Result<Option<Self>>
fn backed_by(as_subregion: impl AsPciSubregion<'a>) -> Result<Option<Self>>
Tries to create an instance of this Capability backed by the given AsPciSubregion. If
things like for instance the Capablity ID and Capability Version and possibly other factors
don’t match what is expected for the present type, returns Ok(None).
Implementations should also make sure that the subregion is big enough, and fail with an error if it isn’t.
Sourcefn header(&self) -> ExtendedCapabilityHeader<'a>
fn header(&self) -> ExtendedCapabilityHeader<'a>
The header of the Extended Capability.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.