pub enum Instruction {
    Call(u64, Operand),
    Set(Operand),
    Get(Operand),
    Constant(Operand),
    Nop(u64),
    Skip(u64),
}
Expand description

An instruction.

Variants§

§

Call(u64, Operand)

A call instruction.

§

Set(Operand)

A set instruction.

§

Get(Operand)

A get instruction.

§

Constant(Operand)

A constant instruction.

§

Nop(u64)

A nop instruction.

§

Skip(u64)

A skip instruction.

It is used only for encoding.

Implementations§

source§

impl Instruction

source

pub const CALL: u8 = 0u8

source

pub const SET: u8 = 1u8

source

pub const GET: u8 = 2u8

source

pub const CONSTANT: u8 = 3u8

source

pub const IF: u8 = 4u8

source

pub const NOP: u8 = 5u8

source

pub const CLOSE: u8 = 6u8

source

pub const SKIP: u8 = 7u8

Trait Implementations§

source§

impl Debug for Instruction

source§

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

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

impl PartialEq for Instruction

source§

fn eq(&self, other: &Instruction) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Eq for Instruction

source§

impl StructuralPartialEq for Instruction

Auto Trait Implementations§

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> 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, U> TryFrom<U> for T
where U: Into<T>,

§

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>,

§

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.