Enum ExpressionOpcode

Source
pub enum ExpressionOpcode<'a> {
Show 50 variants RefExpression(ReferenceExpressionOpcode<'a>), Buffer(Buffer<'a>), Package(Package<'a>), VarPackage(VarPackage<'a>), Acquire { mutex: SuperName<'a>, timeout: u16, }, Add(TermArg<'a>, TermArg<'a>, Target<'a>), BitwiseAnd(TermArg<'a>, TermArg<'a>, Target<'a>), Concat(TermArg<'a>, TermArg<'a>, Target<'a>), ConcatRes(TermArg<'a>, TermArg<'a>, Target<'a>), CondRefOf(SuperName<'a>, Target<'a>), CopyObject(TermArg<'a>, SimpleName), Decrement(SuperName<'a>), Divide { dividend: TermArg<'a>, divisor: TermArg<'a>, remainder: Target<'a>, quotient: Target<'a>, }, FindSetLeftBit(TermArg<'a>, Target<'a>), FindSetRightBit(TermArg<'a>, Target<'a>), FromBCD(TermArg<'a>, Target<'a>), Increment(SuperName<'a>), LogicalAnd(TermArg<'a>, TermArg<'a>), Equal(TermArg<'a>, TermArg<'a>), Greater(TermArg<'a>, TermArg<'a>), GreaterEqual(TermArg<'a>, TermArg<'a>), Less(TermArg<'a>, TermArg<'a>), LessEqual(TermArg<'a>, TermArg<'a>), LogicalNot(TermArg<'a>), NotEqual(TermArg<'a>, TermArg<'a>), LoadTable { signature: TermArg<'a>, oem_id: TermArg<'a>, oem_table_id: TermArg<'a>, root_path: TermArg<'a>, parameter_path: TermArg<'a>, parameter_data: TermArg<'a>, }, LogicalOr(TermArg<'a>, TermArg<'a>), Match { search_package: TermArg<'a>, a: (MatchOpcode, TermArg<'a>), b: (MatchOpcode, TermArg<'a>), start_index: TermArg<'a>, }, Mid { source: TermArg<'a>, index: TermArg<'a>, length: TermArg<'a>, result: Target<'a>, }, Mod(TermArg<'a>, TermArg<'a>, Target<'a>), Multiply(TermArg<'a>, TermArg<'a>, Target<'a>), Nand(TermArg<'a>, TermArg<'a>, Target<'a>), Nor(TermArg<'a>, TermArg<'a>, Target<'a>), BitwiseNot(TermArg<'a>, Target<'a>), ObjectType(SuperName<'a>), BitwiseOr(TermArg<'a>, TermArg<'a>, Target<'a>), ShiftLeft(TermArg<'a>, TermArg<'a>, Target<'a>), ShiftRight(TermArg<'a>, TermArg<'a>, Target<'a>), SizeOf(SuperName<'a>), Store(TermArg<'a>, SuperName<'a>), Subtract(TermArg<'a>, TermArg<'a>, Target<'a>), Timer, ToBCD(TermArg<'a>, Target<'a>), ToBuffer(TermArg<'a>, Target<'a>), ToDecimalString(TermArg<'a>, Target<'a>), ToHexString(TermArg<'a>, Target<'a>), ToInteger(TermArg<'a>, Target<'a>), ToString { source: TermArg<'a>, length: TermArg<'a>, result: Target<'a>, }, Wait { event: SuperName<'a>, timeout: TermArg<'a>, }, BitwiseXor(TermArg<'a>, TermArg<'a>, Target<'a>),
}
Expand description

Terminal operation that evaluates to a value or reference.

Variants§

§

RefExpression(ReferenceExpressionOpcode<'a>)

§

Buffer(Buffer<'a>)

§

Package(Package<'a>)

§

VarPackage(VarPackage<'a>)

§

Acquire

Try to acquire a mutex, returning true if the attempt times out

Fields

§mutex: SuperName<'a>
§timeout: u16
§

Add(TermArg<'a>, TermArg<'a>, Target<'a>)

Add two integers

§

BitwiseAnd(TermArg<'a>, TermArg<'a>, Target<'a>)

Compute a bitwise AND of two integers

§

Concat(TermArg<'a>, TermArg<'a>, Target<'a>)

Concatenate two strings or buffers

§

ConcatRes(TermArg<'a>, TermArg<'a>, Target<'a>)

Concatenate two buffers containing resource templates

§

CondRefOf(SuperName<'a>, Target<'a>)

Try to create a reference, returning false if it is not possible

§

CopyObject(TermArg<'a>, SimpleName)

Update the destination with a copy of the given value, without converting its type. Compare with ExpressionOpcode::Store.

§

Decrement(SuperName<'a>)

Decrement an integer variable

§

Divide

Perform integer (quotient-remainder) division

Fields

§dividend: TermArg<'a>
§divisor: TermArg<'a>
§remainder: Target<'a>
§quotient: Target<'a>
§

FindSetLeftBit(TermArg<'a>, Target<'a>)

Get the index of the most-significant set bit in a value

§

FindSetRightBit(TermArg<'a>, Target<'a>)

Get the index of the least-significant set bit in a value

§

FromBCD(TermArg<'a>, Target<'a>)

Decode a series of binary-coded decimal nibbles into an integer

§

Increment(SuperName<'a>)

Increment an integer variable

§

LogicalAnd(TermArg<'a>, TermArg<'a>)

Evaluate to true if both arguments are non-zero integers

§

Equal(TermArg<'a>, TermArg<'a>)

Evaluate to true if both values are equal

§

Greater(TermArg<'a>, TermArg<'a>)

Evaluate to true if the left value is greater than the right value

§

GreaterEqual(TermArg<'a>, TermArg<'a>)

Evaluate to true if the left value is greater than or equal to the right value

§

Less(TermArg<'a>, TermArg<'a>)

Evaluate to true if the left value is less than the right value

§

LessEqual(TermArg<'a>, TermArg<'a>)

Evaluate to true if the left value is less than or equal to the right value

§

LogicalNot(TermArg<'a>)

Evaluate to true if the value is zero

§

NotEqual(TermArg<'a>, TermArg<'a>)

Evaluate to true if the left value is not equal to the right value

§

LoadTable

Find an ACPI table indexed by the XSDT

Fields

§signature: TermArg<'a>
§oem_id: TermArg<'a>
§oem_table_id: TermArg<'a>
§root_path: TermArg<'a>
§parameter_path: TermArg<'a>
§parameter_data: TermArg<'a>
§

LogicalOr(TermArg<'a>, TermArg<'a>)

Evaluate to true if either of the values is a non-zero integer

§

Match

Search a package and return the index of the first contained value that matches both specified conditions

Fields

§search_package: TermArg<'a>
§start_index: TermArg<'a>
§

Mid

Copy a slice of a string or buffer.

Fields

§source: TermArg<'a>
§index: TermArg<'a>
§length: TermArg<'a>
§result: Target<'a>
§

Mod(TermArg<'a>, TermArg<'a>, Target<'a>)

Compute the remainder of dividing the first integer by the second

§

Multiply(TermArg<'a>, TermArg<'a>, Target<'a>)

Multiply two integers

§

Nand(TermArg<'a>, TermArg<'a>, Target<'a>)

Compute the bitwise NAND of two integers

§

Nor(TermArg<'a>, TermArg<'a>, Target<'a>)

Compute the bitwise NOR of two integers

§

BitwiseNot(TermArg<'a>, Target<'a>)

Invert the bits of an integer

§

ObjectType(SuperName<'a>)

Get an integer representing the type of the given value. See ObjectType.

§

BitwiseOr(TermArg<'a>, TermArg<'a>, Target<'a>)

Compute the bitwise OR of the two integers

§

ShiftLeft(TermArg<'a>, TermArg<'a>, Target<'a>)

Multiply an integer by the specified power of two

§

ShiftRight(TermArg<'a>, TermArg<'a>, Target<'a>)

Divide an integer by the specified power of two

§

SizeOf(SuperName<'a>)

Get the length of a string, buffer, or package

§

Store(TermArg<'a>, SuperName<'a>)

Update the destination with the given value, converting it to the type of the previous value. Compare with ExpressionOpcode::CopyObject.

§

Subtract(TermArg<'a>, TermArg<'a>, Target<'a>)

Subtract an integer from another, ignoring underflow

§

Timer

Get the current value of the system timer in 100ns

§

ToBCD(TermArg<'a>, Target<'a>)

Encode an integer into a sequence of binary-coded decimal nibbles

§

ToBuffer(TermArg<'a>, Target<'a>)

Convert a value to a buffer

§

ToDecimalString(TermArg<'a>, Target<'a>)

Encode a value as an ASCII decimal number

§

ToHexString(TermArg<'a>, Target<'a>)

Encode a value as an ASCII hexadecimal number

§

ToInteger(TermArg<'a>, Target<'a>)

Convert a value to an integer, either by parsing a string or taking the first bytes of a buffer.

§

ToString

Copy an ASCII string from a buffer into a string value

Fields

§source: TermArg<'a>
§length: TermArg<'a>
§result: Target<'a>
§

Wait

Try to wait for another thread to signal an event object, returning true if the attempt times out

Fields

§event: SuperName<'a>
§timeout: TermArg<'a>
§

BitwiseXor(TermArg<'a>, TermArg<'a>, Target<'a>)

Compute the bitwise XOR of two integers

Trait Implementations§

Source§

impl<'a> Clone for ExpressionOpcode<'a>

Source§

fn clone(&self) -> ExpressionOpcode<'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 ExpressionOpcode<'a>

Source§

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

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

impl<'a> From<Buffer<'a>> for ExpressionOpcode<'a>

Source§

fn from(b: Buffer<'a>) -> ExpressionOpcode<'a>

Converts to this type from the input type.
Source§

impl<'a> From<ExpressionOpcode<'a>> for TermArg<'a>

Source§

fn from(e: ExpressionOpcode<'a>) -> TermArg<'a>

Converts to this type from the input type.
Source§

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

Source§

fn from(e: ExpressionOpcode<'a>) -> TermObject<'a>

Converts to this type from the input type.
Source§

impl<'a> From<Package<'a>> for ExpressionOpcode<'a>

Source§

fn from(p: Package<'a>) -> ExpressionOpcode<'a>

Converts to this type from the input type.
Source§

impl<'a> From<ReferenceExpressionOpcode<'a>> for ExpressionOpcode<'a>

Source§

fn from(r: ReferenceExpressionOpcode<'a>) -> ExpressionOpcode<'a>

Converts to this type from the input type.
Source§

impl<'a> From<VarPackage<'a>> for ExpressionOpcode<'a>

Source§

fn from(p: VarPackage<'a>) -> ExpressionOpcode<'a>

Converts to this type from the input type.
Source§

impl<'a> Parse<'a> for ExpressionOpcode<'a>

Grammar:

Type2Opcode := DefAcquire | DefAdd | DefAnd | DefBuffer | DefConcat |
               DefConcatRes | DefCondRefOf | DefCopyObject | DefDecrement |
               DefDerefOf | DefDivide | DefFindSetLeftBit | DefFindSetRightBit |
               DefFromBCD | DefIncrement | DefIndex | DefLAnd | DefLEqual |
               DefLGreater | DefLGreaterEqual | DefLLess | DefLLessEqual | DefMid |
               DefLNot | DefLNotEqual | DefLoadTable | DefLOr | DefMatch | DefMod |
               DefMultiply | DefNAnd | DefNOr | DefNot | DefObjectType | DefOr |
               DefPackage | DefVarPackage | DefRefOf | DefShiftLeft |
               DefShiftRight | DefSizeOf | DefStore | DefSubtract | DefTimer |
               DefToBCD | DefToBuffer | DefToDecimalString | DefToHexString |
               DefToInteger | DefToString | DefWait | DefXOr | MethodInvocation
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 ExpressionOpcode<'a>

Source§

fn eq(&self, other: &ExpressionOpcode<'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 ExpressionOpcode<'a>

Source§

impl<'a> StructuralPartialEq for ExpressionOpcode<'a>

Auto Trait Implementations§

§

impl<'a> Freeze for ExpressionOpcode<'a>

§

impl<'a> RefUnwindSafe for ExpressionOpcode<'a>

§

impl<'a> Send for ExpressionOpcode<'a>

§

impl<'a> Sync for ExpressionOpcode<'a>

§

impl<'a> Unpin for ExpressionOpcode<'a>

§

impl<'a> UnwindSafe for ExpressionOpcode<'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.