Opcode

Enum Opcode 

Source
pub enum Opcode {
Show 40 variants Nop = 0, InitStack = 1, Call = 2, Syscall = 3, Ret = 4, RetV = 5, Jmp = 6, Jz = 7, PushNil = 8, PushTrue = 9, PushI32 = 10, PushI16 = 11, PushI8 = 12, PushF32 = 13, PushString = 14, PushGlobal = 15, PushStack = 16, PushGlobalTable = 17, PushLocalTable = 18, PushTop = 19, PushReturn = 20, PopGlobal = 21, PopStack = 22, PopGlobalTable = 23, PopLocalTable = 24, Neg = 25, Add = 26, Sub = 27, Mul = 28, Div = 29, Mod = 30, BitTest = 31, And = 32, Or = 33, SetE = 34, SetNE = 35, SetG = 36, SetLE = 37, SetL = 38, SetGE = 39,
}

Variants§

§

Nop = 0

§

InitStack = 1

§

Call = 2

§

Syscall = 3

§

Ret = 4

§

RetV = 5

§

Jmp = 6

§

Jz = 7

§

PushNil = 8

§

PushTrue = 9

§

PushI32 = 10

§

PushI16 = 11

§

PushI8 = 12

§

PushF32 = 13

§

PushString = 14

§

PushGlobal = 15

§

PushStack = 16

§

PushGlobalTable = 17

§

PushLocalTable = 18

§

PushTop = 19

§

PushReturn = 20

§

PopGlobal = 21

§

PopStack = 22

§

PopGlobalTable = 23

§

PopLocalTable = 24

§

Neg = 25

§

Add = 26

§

Sub = 27

§

Mul = 28

§

Div = 29

§

Mod = 30

§

BitTest = 31

§

And = 32

§

Or = 33

§

SetE = 34

§

SetNE = 35

§

SetG = 36

§

SetLE = 37

§

SetL = 38

§

SetGE = 39

Trait Implementations§

Source§

impl ToString for Opcode

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl TryFrom<&str> for Opcode

Source§

type Error = ()

The type returned in the event of a conversion error.
Source§

fn try_from(v: &str) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<i32> for Opcode

Source§

type Error = ()

The type returned in the event of a conversion error.
Source§

fn try_from(v: i32) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<u8> for Opcode

Source§

type Error = ()

The type returned in the event of a conversion error.
Source§

fn try_from(v: u8) -> Result<Self, Self::Error>

Performs the conversion.

Auto Trait Implementations§

§

impl Freeze for Opcode

§

impl RefUnwindSafe for Opcode

§

impl Send for Opcode

§

impl Sync for Opcode

§

impl Unpin for Opcode

§

impl UnwindSafe for Opcode

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

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.