Trait iced_x86::FormatterOutput
source · pub trait FormatterOutput {
// Required method
fn write(&mut self, text: &str, kind: FormatterTextKind);
// Provided methods
fn write_prefix(
&mut self,
instruction: &Instruction,
text: &str,
prefix: PrefixKind
) { ... }
fn write_mnemonic(&mut self, instruction: &Instruction, text: &str) { ... }
fn write_number(
&mut self,
instruction: &Instruction,
operand: u32,
instruction_operand: Option<u32>,
text: &str,
value: u64,
number_kind: NumberKind,
kind: FormatterTextKind
) { ... }
fn write_decorator(
&mut self,
instruction: &Instruction,
operand: u32,
instruction_operand: Option<u32>,
text: &str,
decorator: DecoratorKind
) { ... }
fn write_register(
&mut self,
instruction: &Instruction,
operand: u32,
instruction_operand: Option<u32>,
text: &str,
register: Register
) { ... }
fn write_symbol(
&mut self,
instruction: &Instruction,
operand: u32,
instruction_operand: Option<u32>,
address: u64,
symbol: &SymbolResult<'_>
) { ... }
}
Expand description
Required Methods§
sourcefn write(&mut self, text: &str, kind: FormatterTextKind)
fn write(&mut self, text: &str, kind: FormatterTextKind)
Provided Methods§
sourcefn write_prefix(
&mut self,
instruction: &Instruction,
text: &str,
prefix: PrefixKind
)
fn write_prefix( &mut self, instruction: &Instruction, text: &str, prefix: PrefixKind )
sourcefn write_mnemonic(&mut self, instruction: &Instruction, text: &str)
fn write_mnemonic(&mut self, instruction: &Instruction, text: &str)
Writes a mnemonic (see Instruction::mnemonic()
)
instruction
: Instructiontext
: Mnemonic text
sourcefn write_number(
&mut self,
instruction: &Instruction,
operand: u32,
instruction_operand: Option<u32>,
text: &str,
value: u64,
number_kind: NumberKind,
kind: FormatterTextKind
)
fn write_number( &mut self, instruction: &Instruction, operand: u32, instruction_operand: Option<u32>, text: &str, value: u64, number_kind: NumberKind, kind: FormatterTextKind )
Writes a number
Arguments
instruction
: Instructionoperand
: Operand number, 0-based. This is a formatter operand and isn’t necessarily the same as an instruction operand.instruction_operand
: Instruction operand number, 0-based, orNone
if it’s an operand created by the formatter.text
: Number textvalue
: Valuenumber_kind
: Number kindkind
: Text kind
sourcefn write_decorator(
&mut self,
instruction: &Instruction,
operand: u32,
instruction_operand: Option<u32>,
text: &str,
decorator: DecoratorKind
)
fn write_decorator( &mut self, instruction: &Instruction, operand: u32, instruction_operand: Option<u32>, text: &str, decorator: DecoratorKind )
Writes a decorator
Arguments
instruction
: Instructionoperand
: Operand number, 0-based. This is a formatter operand and isn’t necessarily the same as an instruction operand.instruction_operand
: Instruction operand number, 0-based, orNone
if it’s an operand created by the formatter.text
: Decorator textdecorator
: Decorator
sourcefn write_register(
&mut self,
instruction: &Instruction,
operand: u32,
instruction_operand: Option<u32>,
text: &str,
register: Register
)
fn write_register( &mut self, instruction: &Instruction, operand: u32, instruction_operand: Option<u32>, text: &str, register: Register )
Writes a register
Arguments
instruction
: Instructionoperand
: Operand number, 0-based. This is a formatter operand and isn’t necessarily the same as an instruction operand.instruction_operand
: Instruction operand number, 0-based, orNone
if it’s an operand created by the formatter.text
: Register textregister
: Register
sourcefn write_symbol(
&mut self,
instruction: &Instruction,
operand: u32,
instruction_operand: Option<u32>,
address: u64,
symbol: &SymbolResult<'_>
)
fn write_symbol( &mut self, instruction: &Instruction, operand: u32, instruction_operand: Option<u32>, address: u64, symbol: &SymbolResult<'_> )
Writes a symbol
Arguments
instruction
: Instructionoperand
: Operand number, 0-based. This is a formatter operand and isn’t necessarily the same as an instruction operand.instruction_operand
: Instruction operand number, 0-based, orNone
if it’s an operand created by the formatter.address
: Addresssymbol
: Symbol