Struct acpi::platform::PlatformInfo

source ·
pub struct PlatformInfo<'a, A>where
    A: Allocator,{
    pub power_profile: PowerProfile,
    pub interrupt_model: InterruptModel<'a, A>,
    pub processor_info: Option<ProcessorInfo<'a, A>>,
    pub pm_timer: Option<PmTimer>,
}
Expand description

PlatformInfo allows the collection of some basic information about the platform from some of the fixed-size tables in a nice way. It requires access to the FADT and MADT. It is the easiest way to get information about the processors and interrupt controllers on a platform.

Fields§

§power_profile: PowerProfile§interrupt_model: InterruptModel<'a, A>§processor_info: Option<ProcessorInfo<'a, A>>

On x86_64 platforms that support the APIC, the processor topology must also be inferred from the interrupt model. That information is stored here, if present.

§pm_timer: Option<PmTimer>

Implementations§

source§

impl<'a> PlatformInfo<'a, Global>

source

pub fn new<H>(tables: &AcpiTables<H>) -> AcpiResult<Self>where H: AcpiHandler,

source§

impl<'a, A> PlatformInfo<'a, A>where A: Allocator + Clone,

source

pub fn new_in<H>(tables: &AcpiTables<H>, allocator: A) -> AcpiResult<Self>where H: AcpiHandler,

Trait Implementations§

source§

impl<'a, A> Debug for PlatformInfo<'a, A>where A: Allocator + Debug,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a, A> RefUnwindSafe for PlatformInfo<'a, A>where A: RefUnwindSafe,

§

impl<'a, A> Send for PlatformInfo<'a, A>where A: Send,

§

impl<'a, A> Sync for PlatformInfo<'a, A>where A: Sync,

§

impl<'a, A> Unpin for PlatformInfo<'a, A>where A: Unpin,

§

impl<'a, A> !UnwindSafe for PlatformInfo<'a, A>

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.