Enum runestick::InstOp[][src]

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

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

impl Clone for InstOp[src]

impl Copy for InstOp[src]

impl Debug for InstOp[src]

impl<'de> Deserialize<'de> for InstOp[src]

impl Display for InstOp[src]

impl Serialize for InstOp[src]

Auto Trait Implementations

impl RefUnwindSafe for InstOp

impl Send for InstOp

impl Sync for InstOp

impl Unpin for InstOp

impl UnwindSafe for InstOp

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.