[−][src]Trait iced_x86::FormatterOutput
Used by a Formatter
to write all text. String
also implements this trait.
The only method that must be implemented is write()
, all other methods call it if they're not overridden.
Required methods
fn write(&mut self, text: &str, kind: FormatterTextKind)
Provided methods
fn write_prefix(
&mut self,
instruction: &Instruction,
text: &str,
prefix: PrefixKind
)
&mut self,
instruction: &Instruction,
text: &str,
prefix: PrefixKind
)
fn write_mnemonic(&mut self, instruction: &Instruction, text: &str)
Writes a mnemonic (see Instruction::mnemonic()
)
instruction
: Instructiontext
: Mnemonic text
fn write_number(
&mut self,
instruction: &Instruction,
operand: u32,
instruction_operand: Option<u32>,
text: &str,
value: u64,
number_kind: NumberKind,
kind: FormatterTextKind
)
&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
fn write_decorator(
&mut self,
instruction: &Instruction,
operand: u32,
instruction_operand: Option<u32>,
text: &str,
decorator: DecoratorKind
)
&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
fn write_register(
&mut self,
instruction: &Instruction,
operand: u32,
instruction_operand: Option<u32>,
text: &str,
register: 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
fn write_symbol(
&mut self,
instruction: &Instruction,
operand: u32,
instruction_operand: Option<u32>,
address: u64,
symbol: &SymbolResult<'_>
)
&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