pub enum TermArg<'a> {
Expression(Box<ExpressionOpcode<'a>>),
Data(Box<DataObject<'a>>),
Arg(ArgObject),
Local(LocalObject),
Name(NameString),
}
Expand description
Term that resolves to a value.
Variants§
Expression(Box<ExpressionOpcode<'a>>)
Data(Box<DataObject<'a>>)
Arg(ArgObject)
Local(LocalObject)
Name(NameString)
Trait Implementations§
Source§impl<'a> From<ComputationalData<'a>> for TermArg<'a>
impl<'a> From<ComputationalData<'a>> for TermArg<'a>
Source§fn from(d: ComputationalData<'a>) -> TermArg<'a>
fn from(d: ComputationalData<'a>) -> TermArg<'a>
Converts to this type from the input type.
Source§impl<'a> From<DataObject<'a>> for TermArg<'a>
impl<'a> From<DataObject<'a>> for TermArg<'a>
Source§fn from(d: DataObject<'a>) -> TermArg<'a>
fn from(d: DataObject<'a>) -> TermArg<'a>
Converts to this type from the input type.
Source§impl<'a> From<ExpressionOpcode<'a>> for TermArg<'a>
impl<'a> From<ExpressionOpcode<'a>> for TermArg<'a>
Source§fn from(e: ExpressionOpcode<'a>) -> TermArg<'a>
fn from(e: ExpressionOpcode<'a>) -> TermArg<'a>
Converts to this type from the input type.
Source§impl<'a> From<LocalObject> for TermArg<'a>
impl<'a> From<LocalObject> for TermArg<'a>
Source§fn from(l: LocalObject) -> TermArg<'a>
fn from(l: LocalObject) -> TermArg<'a>
Converts to this type from the input type.
Source§impl<'a> From<NameString> for TermArg<'a>
impl<'a> From<NameString> for TermArg<'a>
Source§fn from(n: NameString) -> TermArg<'a>
fn from(n: NameString) -> TermArg<'a>
Converts to this type from the input type.
Source§impl<'a> From<ReferenceExpressionOpcode<'a>> for TermArg<'a>
impl<'a> From<ReferenceExpressionOpcode<'a>> for TermArg<'a>
Source§fn from(r: ReferenceExpressionOpcode<'a>) -> TermArg<'a>
fn from(r: ReferenceExpressionOpcode<'a>) -> TermArg<'a>
Converts to this type from the input type.
Source§impl<'a> From<VarPackage<'a>> for TermArg<'a>
impl<'a> From<VarPackage<'a>> for TermArg<'a>
Source§fn from(p: VarPackage<'a>) -> TermArg<'a>
fn from(p: VarPackage<'a>) -> TermArg<'a>
Converts to this type from the input type.
Source§impl<'a> Parse<'a> for TermArg<'a>
Grammar:
impl<'a> Parse<'a> for TermArg<'a>
Grammar:
TermArg := Type2Opcode | DataObject | ArgObj | LocalObject
TermArgList := Nothing | <TermArg TermArgList>
Note that this syntax does not list NameString
s as valid TermArgs
, except as
part of MethodInvocation
under Type6Opcode
. However, it’s abundantly clear
that names can be used as references to their values anywhere a term argument is
expected. Tests with the ACPICA compiler confirm this. However, bare names are
not allowed in TermObj
positions, so it isn’t appropriate to add them to
Type2Opcode
(ExpressionOpcode
), and we have to add it to TermArg
instead.
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
impl<'a> Eq for TermArg<'a>
impl<'a> StructuralPartialEq for TermArg<'a>
Auto Trait Implementations§
impl<'a> Freeze for TermArg<'a>
impl<'a> RefUnwindSafe for TermArg<'a>
impl<'a> Send for TermArg<'a>
impl<'a> Sync for TermArg<'a>
impl<'a> Unpin for TermArg<'a>
impl<'a> UnwindSafe for TermArg<'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