Enum runestick::InstOp[][src]

pub enum InstOp {
Show 20 variants Add, Sub, Mul, Div, Rem, BitAnd, BitXor, BitOr, Shl, Shr, Lt, Gt, Lte, Gte, Eq, Neq, Is, IsNot, And, Or,
}
Expand description

An operation between two values on the machine.

Variants

Add

The add operation. a + b.

Sub

The sub operation. a - b.

Mul

The multiply operation. a * b.

Div

The division operation. a / b.

Rem

The remainder operation. a % b.

BitAnd

The bitwise and operation. a & b.

BitXor

The bitwise xor operation. a ^ b.

BitOr

The bitwise or operation. a | b.

Shl

The shift left operation. a << b.

Shr

The shift right operation. a << b.

Lt

Compare two values on the stack for lt and push the result as a boolean on the stack.

Gt

Compare two values on the stack for gt and push the result as a boolean on the stack.

Lte

Compare two values on the stack for lte and push the result as a boolean on the stack.

Gte

Compare two values on the stack for gte and push the result as a boolean on the stack.

Eq

Compare two values on the stack for equality and push the result as a boolean on the stack.

Operation

<b>
<a>
=> <bool>
Neq

Compare two values on the stack for inequality and push the result as a boolean on the stack.

Operation

<b>
<a>
=> <bool>
Is

Test if the top of the stack is an instance of the second item on the stack.

Operation

<type>
<value>
=> <boolean>
IsNot

Test if the top of the stack is not an instance of the second item on the stack.

Operation

<type>
<value>
=> <boolean>
And

Pop two values from the stack and test if they are both boolean true.

Operation

<boolean>
<boolean>
=> <boolean>
Or

Pop two values from the stack and test if either of them are boolean true.

Operation

<boolean>
<boolean>
=> <boolean>

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

Formats the value using the given formatter. Read more

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

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

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.