Skip to main content

AcpiTable

Trait AcpiTable 

Source
pub unsafe trait AcpiTable {
    const SIGNATURE: Signature;

    // Required method
    fn header(&self) -> &SdtHeader;

    // Provided method
    fn validate(&self) -> Result<(), AcpiError> { ... }
}
Expand description

All types representing ACPI tables should implement this trait.

§Safety

The table’s memory is naively interpreted, so you must be careful in providing a type that correctly represents the table’s structure. Regardless of the provided type’s size, the region mapped will be the size specified in the SDT’s header. If a table’s definition may be larger than a valid SDT’s size, ExtendedField should be used to define fields that may or may not exist.

Required Associated Constants§

Required Methods§

Source

fn header(&self) -> &SdtHeader

Provided Methods§

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.

Implementors§

Source§

impl AcpiTable for Bgrt

Source§

const SIGNATURE: Signature = Signature::BGRT

Source§

impl AcpiTable for Fadt

§Safety

Implementation properly represents a valid FADT.

Source§

const SIGNATURE: Signature = Signature::FADT

Source§

impl AcpiTable for HpetTable

Source§

const SIGNATURE: Signature = Signature::HPET

Source§

impl AcpiTable for Madt

Source§

const SIGNATURE: Signature = Signature::MADT

Source§

impl AcpiTable for Mcfg

§Safety: Implementation properly represents a valid MCFG.
Source§

const SIGNATURE: Signature = Signature::MCFG

Source§

impl AcpiTable for Slit

Source§

const SIGNATURE: Signature = Signature::SLIT

Source§

impl AcpiTable for Spcr

Source§

const SIGNATURE: Signature = Signature::SPCR

Source§

impl AcpiTable for Srat

Source§

const SIGNATURE: Signature = Signature::SRAT