Opcode

Trait Opcode 

Source
pub trait Opcode:
    From<Self::Mnemonic>
    + Send
    + Sync
    + FromPrimitive
    + ToPrimitive
    + Copy
    + Clone
    + Debug {
    type Mnemonic;

Show 13 methods // Required methods fn has_arg(&self) -> bool; fn has_extended_arg(&self) -> bool; fn has_const(&self) -> bool; fn has_comp(&self) -> bool; fn is_other_conditional_jump(&self) -> bool; fn is_relative_jump(&self) -> bool; fn is_absolute_jump(&self) -> bool; fn is_conditional_jump(&self) -> bool; fn has_name(&self) -> bool; fn has_local(&self) -> bool; fn has_free(&self) -> bool; fn mnemonic(&self) -> Self::Mnemonic; // Provided method fn is_jump(&self) -> bool { ... }
}
Expand description

Trait that provides convenience routines for opcode properties such as whether or not it has an argument, is a jump, etc.

Required Associated Types§

Required Methods§

Source

fn has_arg(&self) -> bool

Whether or not this opcode has an argument

Source

fn has_extended_arg(&self) -> bool

Whether or not this opcode has an extended argument

Source

fn has_const(&self) -> bool

Whether or not this opcode has a constant parameter

Source

fn has_comp(&self) -> bool

Whether or not this opcode is a boolean operation

Source

fn is_other_conditional_jump(&self) -> bool

Source

fn is_relative_jump(&self) -> bool

Whether or not this opcode has a relative jump target

Source

fn is_absolute_jump(&self) -> bool

Whether or not this opcode has an absolute jump target

Source

fn is_conditional_jump(&self) -> bool

Whether or not this opcode is a conditional jump

Source

fn has_name(&self) -> bool

Whether or not this opcode accesses an attribute by name

Source

fn has_local(&self) -> bool

Whether or not this opcode accesses a local variable

Source

fn has_free(&self) -> bool

Whether or not this opcode accesses a free variable

Source

fn mnemonic(&self) -> Self::Mnemonic

Provided Methods§

Source

fn is_jump(&self) -> bool

Whether or not this opcode is any kind of instruction which may jump

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§