Trait iced_x86::FormatterOutput[][src]

pub trait FormatterOutput {
    fn write(&mut self, text: &str, kind: FormatterTextKind);

    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<'_>
    ) { ... } }

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)[src]

Writes text and text kind

Arguments

  • text: Text
  • kind: Text kind
Loading content...

Provided methods

fn write_prefix(
    &mut self,
    instruction: &Instruction,
    text: &str,
    prefix: PrefixKind
)
[src]

Writes a prefix

Arguments

  • instruction: Instruction
  • text: Prefix text
  • prefix: Prefix

fn write_mnemonic(&mut self, instruction: &Instruction, text: &str)[src]

Writes a mnemonic (see Instruction::mnemonic())

  • instruction: Instruction
  • text: Mnemonic text

fn write_number(
    &mut self,
    instruction: &Instruction,
    operand: u32,
    instruction_operand: Option<u32>,
    text: &str,
    value: u64,
    number_kind: NumberKind,
    kind: FormatterTextKind
)
[src]

Writes a number

Arguments

  • instruction: Instruction
  • operand: 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, or None if it’s an operand created by the formatter.
  • text: Number text
  • value: Value
  • number_kind: Number kind
  • kind: Text kind

fn write_decorator(
    &mut self,
    instruction: &Instruction,
    operand: u32,
    instruction_operand: Option<u32>,
    text: &str,
    decorator: DecoratorKind
)
[src]

Writes a decorator

Arguments

  • instruction: Instruction
  • operand: 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, or None if it’s an operand created by the formatter.
  • text: Decorator text
  • decorator: Decorator

fn write_register(
    &mut self,
    instruction: &Instruction,
    operand: u32,
    instruction_operand: Option<u32>,
    text: &str,
    register: Register
)
[src]

Writes a register

Arguments

  • instruction: Instruction
  • operand: 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, or None if it’s an operand created by the formatter.
  • text: Register text
  • register: Register

fn write_symbol(
    &mut self,
    instruction: &Instruction,
    operand: u32,
    instruction_operand: Option<u32>,
    address: u64,
    symbol: &SymbolResult<'_>
)
[src]

Writes a symbol

Arguments

  • instruction: Instruction
  • operand: 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, or None if it’s an operand created by the formatter.
  • address: Address
  • symbol: Symbol
Loading content...

Implementations on Foreign Types

impl FormatterOutput for String[src]

Loading content...

Implementors

Loading content...