Enum rustdb::run::Instruction

source ·
#[non_exhaustive]
pub enum Instruction {
Show 24 variants PushConst(Value), PushValue(CExpPtr<Value>), PushLocal(usize), PopToLocal(usize), Jump(usize), JumpIfFalse(usize, CExpPtr<bool>), Call(Rc<Function>), Return, Throw, Execute, ForInit(usize, Box<CTableExpression>), ForNext(usize, Box<ForNextInfo>), ForSortInit(usize, Box<CFromExpression>), ForSortNext(usize, Box<(usize, usize, Assigns)>), DataOp(Box<DO>), Select(Box<CFromExpression>), Set(Box<CFromExpression>), PushInt(CExpPtr<i64>), PushFloat(CExpPtr<f64>), PushBool(CExpPtr<bool>), AssignLocal(usize, CExpPtr<Value>), AppendLocal(usize, CExpPtr<Value>), IncLocal(usize, CExpPtr<Value>), DecLocal(usize, CExpPtr<Value>),
}
Expand description

Instruction.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

PushConst(Value)

Push constant.

§

PushValue(CExpPtr<Value>)

Push expression.

§

PushLocal(usize)

Push local variable.

§

PopToLocal(usize)

Assign local variable.

§

Jump(usize)

Jump.

§

JumpIfFalse(usize, CExpPtr<bool>)

Jump if false.

§

Call(Rc<Function>)

Call

§

Return

Return from function.

§

Throw

Throw error.

§

Execute

Execute string.

§

ForInit(usize, Box<CTableExpression>)

Initialise FOR statement.

§

ForNext(usize, Box<ForNextInfo>)

Next iteration of FOR statement.

§

ForSortInit(usize, Box<CFromExpression>)

Initialise FOR statement ( sorted case ).

§

ForSortNext(usize, Box<(usize, usize, Assigns)>)

Next iteration of FOR statement ( sorted case ).

§

DataOp(Box<DO>)

Data operation.

§

Select(Box<CFromExpression>)

SELECT expression.

§

Set(Box<CFromExpression>)

Set local variables from table.

§

PushInt(CExpPtr<i64>)

Push Integer expression.

§

PushFloat(CExpPtr<f64>)

Push Float expression.

§

PushBool(CExpPtr<bool>)

Push bool expression.

§

AssignLocal(usize, CExpPtr<Value>)

Assign a local variable.

§

AppendLocal(usize, CExpPtr<Value>)

Append to a local variable.

§

IncLocal(usize, CExpPtr<Value>)

Increment (+=) a local variable.

§

DecLocal(usize, CExpPtr<Value>)

Decrement (-=) a local variable.

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.