Struct libcw::redcode::Instruction
[−]
[src]
pub struct Instruction { /* fields omitted */ }
Redcode instruction
Methods
impl Instruction
[src]
fn new(
op: OpCode,
modifier: Modifier,
a: Value,
a_mode: AddressingMode,
b: Value,
b_mode: AddressingMode
) -> Self
[src]
op: OpCode,
modifier: Modifier,
a: Value,
a_mode: AddressingMode,
b: Value,
b_mode: AddressingMode
) -> Self
Create a new instruction
Trait Implementations
impl Debug for Instruction
[src]
impl Copy for Instruction
[src]
impl Clone for Instruction
[src]
fn clone(&self) -> Instruction
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl PartialEq for Instruction
[src]
fn eq(&self, __arg_0: &Instruction) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Instruction) -> bool
[src]
This method tests for !=
.
impl Eq for Instruction
[src]
impl Default for Instruction
[src]
fn default() -> Instruction
[src]
Returns the "default value" for a type. Read more
impl Instruction for Instruction
[src]
fn op(&self) -> OpCode
[src]
Get the opcode
fn set_op(&mut self, v: OpCode)
[src]
Set the instruction opcode
fn modifier(&self) -> Modifier
[src]
Get Operation Mode
fn set_modifier(&mut self, v: Modifier)
[src]
Set operation mode
fn a(&self) -> Value
[src]
Get the value of the A field
fn set_a(&mut self, v: Value)
[src]
Set the value of the A field
fn a_mode(&self) -> AddressingMode
[src]
Get the addressing mode of the A Field
fn set_a_mode(&mut self, v: AddressingMode)
[src]
Set the addressing mode of the A field
fn b(&self) -> Value
[src]
Get value of the B field
fn set_b(&mut self, v: Value)
[src]
Set the value of the B field
fn b_mode(&self) -> AddressingMode
[src]
Get the addressing mode of the B field
fn set_b_mode(&mut self, v: AddressingMode)
[src]
Set the AddressingMode of the B field