Enum NamedObject

Source
pub enum NamedObject<'a> {
Show 19 variants BankField { region_name: NameString, bank_name: NameString, bank_value: TermArg<'a>, flags: FieldFlags, elements: Vec<FieldElement<'a>>, }, CreateBitField { source_buffer: TermArg<'a>, bit_index: TermArg<'a>, name: NameString, }, CreateByteField { source_buffer: TermArg<'a>, byte_index: TermArg<'a>, name: NameString, }, CreateDWordField { source_buffer: TermArg<'a>, byte_index: TermArg<'a>, name: NameString, }, CreateField { source_buffer: TermArg<'a>, bit_index: TermArg<'a>, num_bits: TermArg<'a>, name: NameString, }, CreateQWordField { source_buffer: TermArg<'a>, byte_index: TermArg<'a>, name: NameString, }, CreateWordField { source_buffer: TermArg<'a>, byte_index: TermArg<'a>, name: NameString, }, DataTableRegion { name: NameString, signature: TermArg<'a>, oem_id: TermArg<'a>, oem_table_id: TermArg<'a>, }, Device { name: NameString, body: Vec<TermObject<'a>>, }, Event(NameString), External { name: NameString, object_type: ObjectType, argument_count: u8, }, Field { region_name: NameString, flags: FieldFlags, elements: Vec<FieldElement<'a>>, }, IndexField { index_name: NameString, data_name: NameString, flags: FieldFlags, elements: Vec<FieldElement<'a>>, }, Method { name: NameString, flags: MethodFlags, body: Vec<TermObject<'a>>, }, Mutex { name: NameString, sync_level: u8, }, OperationRegion { name: NameString, region_space: RegionSpace, offset: TermArg<'a>, length: TermArg<'a>, }, PowerResource { name: NameString, system_level: u8, resource_order: u16, body: Vec<TermObject<'a>>, }, Processor { name: NameString, id: u8, register_block_addr: u32, register_block_length: u8, body: Vec<TermObject<'a>>, }, ThermalZone { name: NameString, body: Vec<TermObject<'a>>, },
}
Expand description

Term that defines an object with a name.

Variants§

§

BankField

Declare fields that can only be accessed after writing to a bank selector

Fields

§region_name: NameString
§bank_name: NameString
§bank_value: TermArg<'a>
§elements: Vec<FieldElement<'a>>
§

CreateBitField

Declare a single-bit field within a buffer

Fields

§source_buffer: TermArg<'a>
§bit_index: TermArg<'a>
§

CreateByteField

Create a one-byte-wide field within a buffer

Fields

§source_buffer: TermArg<'a>
§byte_index: TermArg<'a>
§

CreateDWordField

Declare a four-byte-wide field within a buffer

Fields

§source_buffer: TermArg<'a>
§byte_index: TermArg<'a>
§

CreateField

Declare an arbitrary-width field within a buffer

Fields

§source_buffer: TermArg<'a>
§bit_index: TermArg<'a>
§num_bits: TermArg<'a>
§

CreateQWordField

Declare an eight-byte-wide field within a buffer

Fields

§source_buffer: TermArg<'a>
§byte_index: TermArg<'a>
§

CreateWordField

Declare a two-byte-wide field within a buffer

Fields

§source_buffer: TermArg<'a>
§byte_index: TermArg<'a>
§

DataTableRegion

Allow an ACPI table indexed in the XSDT to be used as a set of fields

Fields

§signature: TermArg<'a>
§oem_id: TermArg<'a>
§oem_table_id: TermArg<'a>
§

Device

Declare a device and its associated fields, methods, and sub-devices

Fields

§body: Vec<TermObject<'a>>
§

Event(NameString)

Declare a waitable synchronization object

§

External

Declare an object that is defined in another ACPI table

Fields

§object_type: ObjectType
§argument_count: u8
§

Field

Declare a group of fields

Fields

§region_name: NameString
§elements: Vec<FieldElement<'a>>
§

IndexField

Declare a group of field that must be accessed by writing to an index register and then reading/writing from a data register.

Fields

§index_name: NameString
§data_name: NameString
§elements: Vec<FieldElement<'a>>
§

Method

Declare a control method

Fields

§body: Vec<TermObject<'a>>
§

Mutex

Declare an acquirable mutex

Fields

§sync_level: u8
§

OperationRegion

Declare an address space that can be used by fields

Fields

§region_space: RegionSpace
§offset: TermArg<'a>
§length: TermArg<'a>
§

PowerResource

Declare a power resource object

Fields

§system_level: u8
§resource_order: u16
§body: Vec<TermObject<'a>>
§

Processor

Declare a processor and associated register block

Fields

§id: u8
§register_block_addr: u32
§register_block_length: u8
§body: Vec<TermObject<'a>>
§

ThermalZone

Declare a thermal zone namespace

Fields

§body: Vec<TermObject<'a>>

Trait Implementations§

Source§

impl<'a> Clone for NamedObject<'a>

Source§

fn clone(&self) -> NamedObject<'a>

Returns a copy of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl<'a> Debug for NamedObject<'a>

Source§

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

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

impl<'a> From<NamedObject<'a>> for TermObject<'a>

Source§

fn from(n: NamedObject<'a>) -> TermObject<'a>

Converts to this type from the input type.
Source§

impl<'a> Parse<'a> for NamedObject<'a>

Grammar:

NamedObj := DefBankField | DefCreateBitField | DefCreateByteField |
    DefCreateDWordField | DefCreateField | DefCreateQWordField |
    DefCreateWordField | DefDataRegion | DefExternal | DefOpRegion | DefPowerRes |
    DefProcessor | DefThermalZone

NOTE: The AML grammar does not list the following alternatives as part of NamedObj, but they are defined in the same place as the others. They are also valid alternatives for the NamedObject production in the ASL grammar, so it is reasonable to assume they were omitted by mistake:

  • DefDevice
  • DefEvent
  • DefField
  • DefIndexField
  • DefMethod
  • DefMutex
Source§

fn parse<E: AMLParseError<'a>>( i: ParserState<'a>, ) -> AMLParseResult<'a, Self, E>

Try to parse an object of this type from the given input and state. Read more
Source§

impl<'a> PartialEq for NamedObject<'a>

Source§

fn eq(&self, other: &NamedObject<'a>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<'a> Eq for NamedObject<'a>

Source§

impl<'a> StructuralPartialEq for NamedObject<'a>

Auto Trait Implementations§

§

impl<'a> Freeze for NamedObject<'a>

§

impl<'a> RefUnwindSafe for NamedObject<'a>

§

impl<'a> Send for NamedObject<'a>

§

impl<'a> Sync for NamedObject<'a>

§

impl<'a> Unpin for NamedObject<'a>

§

impl<'a> UnwindSafe for NamedObject<'a>

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. 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 T
where 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

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 T
where U: TryFrom<T>,

Source§

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.