Trait msp430_asm::emulate::Emulated
source · pub trait Emulated {
fn mnemonic(&self) -> &str;
fn destination(&self) -> &Option<Operand>;
fn size(&self) -> usize;
fn operand_width(&self) -> &Option<OperandWidth>;
}
Expand description
All emulated instructions implement this trait to provide a common interface and polymorphism
Required Methods§
sourcefn mnemonic(&self) -> &str
fn mnemonic(&self) -> &str
Return the mnemonic for the instruction. This is operand width aware
sourcefn destination(&self) -> &Option<Operand>
fn destination(&self) -> &Option<Operand>
Returns the destination operand
sourcefn size(&self) -> usize
fn size(&self) -> usize
Returns the size of the instruction (in bytes). This should defer to the original instruction due to the fact that emulation is a lossy process
sourcefn operand_width(&self) -> &Option<OperandWidth>
fn operand_width(&self) -> &Option<OperandWidth>
Returns the operand width if one is specified