pub enum FieldElement<'a> {
Named {
name: NameSeg,
bit_length: u32,
},
Reserved {
bit_length: u32,
},
AccessAs(AccessType, AccessAttrib),
ConnectNamed(NameString),
ConnectBuffer(Buffer<'a>),
}
Expand description
A substructure of a field.
Variants§
Named
A named bitfield.
Reserved
Indicates that the next most significant bit_length
bits of the field are
skipped.
AccessAs(AccessType, AccessAttrib)
Sets access information for following fields.
ConnectNamed(NameString)
Indicates that following fields should be accessed with the named GPIO/Serial descriptor.
ConnectBuffer(Buffer<'a>)
Indicates that following fields should be accessed with the GPIO/Serial descriptor contained in the given buffer.
Trait Implementations§
Source§impl<'a> Clone for FieldElement<'a>
impl<'a> Clone for FieldElement<'a>
Source§fn clone(&self) -> FieldElement<'a>
fn clone(&self) -> FieldElement<'a>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<'a> Debug for FieldElement<'a>
impl<'a> Debug for FieldElement<'a>
Source§impl<'a> Parse<'a> for FieldElement<'a>
Grammar:
impl<'a> Parse<'a> for FieldElement<'a>
Grammar:
FieldList := Nothing | <FieldElement FieldList>
FieldElement := NamedField | ReservedField | AccessField | ExtendedAccessField |
ConnectField
NamedField := NameSeg PkgLength
ReservedField := 0x00 PkgLength
ConnectField := <0x02 NameString> | <0x02 ??BufferData>
Notes:
- Although the ASL
Offset
grammar uses an absolute byte offset, the ACPICA compiler seems to translate it into relative bit offset when it outputs theReservedField
op in AML. AccessField
andExtendedAccessField
encode the same information and are merged into one enum variant. Seeaccess_field
andextended_access_field
.- The ACPICA parser expects
BufferData
to be aDefBuffer
op. - The
ConnectField
op in split into two enum variants to avoid another level of indirection.
Source§fn parse<E: AMLParseError<'a>>(
i: ParserState<'a>,
) -> AMLParseResult<'a, Self, E>
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 FieldElement<'a>
impl<'a> PartialEq for FieldElement<'a>
impl<'a> Eq for FieldElement<'a>
impl<'a> StructuralPartialEq for FieldElement<'a>
Auto Trait Implementations§
impl<'a> Freeze for FieldElement<'a>
impl<'a> RefUnwindSafe for FieldElement<'a>
impl<'a> Send for FieldElement<'a>
impl<'a> Sync for FieldElement<'a>
impl<'a> Unpin for FieldElement<'a>
impl<'a> UnwindSafe for FieldElement<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more