Struct x64asm::instruction::Instruction
source · pub struct Instruction {
pub mnemonic: Mnemonic,
pub operands: Vec<Operand>,
pub comment: Option<String>,
}
Expand description
Instruction to be transformed into actual assembly code.
Fields§
§mnemonic: Mnemonic
The instruction’s mnemonic. It’s where the instruction starts.
operands: Vec<Operand>
The operands following the mnemonic for the instruction. The vector can be null, some of mnemonics don’t require operands.
comment: Option<String>
The comment at the end of the line. When None
, no comment is added.
Trait Implementations§
source§impl Clone for Instruction
impl Clone for Instruction
source§fn clone(&self) -> Instruction
fn clone(&self) -> Instruction
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl ToAssembly for Instruction
impl ToAssembly for Instruction
source§fn to_assembly(&self, separator: Separator) -> String
fn to_assembly(&self, separator: Separator) -> String
Converts anything into a
String
, which is necessarily a valid
assembly or a part of code.