Struct rstubs::arch::acpi::Acpi

source ·
pub struct Acpi {
    root: &'static SysDescTable,
    entry_size: usize,
}
Expand description

ACPI is the successor to APM (Advanced Power Management), aiming to give the operating system more control over the hardware.

This extended control, for instance, enables the operating system to assign a particular amount of energy to every device (e.g., by disabling a device or changing to standby mode). For this purpose, BIOS and chipset provide a set of tables that describe the system and its components and provide routines the OS can call. These tables contain details about the system, such as the number of CPU cores and the LAPIC/IOAPIC, which are determined during system boot.

Fields§

§root: &'static SysDescTable§entry_size: usize

Implementations§

source§

impl Acpi

source

pub fn load() -> Result<Acpi, ApicError>

Load the ACPI tables by searching through the BIOS memory area.

source

pub fn len(&self) -> usize

source

pub fn entry(&self, i: usize) -> Option<&'static SysDescTable>

Get the i-th entry

source

pub fn find(&self, signature: [u8; 4]) -> Option<&'static SysDescTable>

Find the given system descriptor table

Trait Implementations§

source§

impl Clone for Acpi

source§

fn clone(&self) -> Acpi

Returns a copy of the value. Read more
1.0.0§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Acpi

source§

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

Formats the value using the given formatter. Read more
source§

impl Copy for Acpi

Auto Trait Implementations§

§

impl RefUnwindSafe for Acpi

§

impl Send for Acpi

§

impl Sync for Acpi

§

impl Unpin for Acpi

§

impl UnwindSafe for Acpi

Blanket Implementations§

§

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

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

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

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

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

§

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

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

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

§

fn into(self) -> U

Calls U::from(self).

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

§

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

§

type Error = Infallible

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

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

Performs the conversion.
§

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

§

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

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

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

Performs the conversion.