pub struct StringFormatter { /* private fields */ }Expand description
Structured formatter that accumulates text into an owned string.
Implementations§
Source§impl StringFormatter
impl StringFormatter
Sourcepub const fn new(options: FormatOptions) -> Self
pub const fn new(options: FormatOptions) -> Self
Construct an empty formatter.
Sourcepub fn into_string(self) -> String
pub fn into_string(self) -> String
Consume the formatter and return its text.
Trait Implementations§
Source§impl FormatIns for StringFormatter
impl FormatIns for StringFormatter
Source§fn options(&self) -> &FormatOptions
fn options(&self) -> &FormatOptions
Return rendering-only options.
Source§fn write_space(&mut self) -> Result
fn write_space(&mut self) -> Result
Write the gap between mnemonic and operands.
Source§fn write_separator(&mut self) -> Result
fn write_separator(&mut self) -> Result
Write an operand separator.
Source§fn write_bank_reg(&mut self, reg: BankReg) -> Result
fn write_bank_reg(&mut self, reg: BankReg) -> Result
Write a banked register.
Source§fn write_freg(&mut self, reg: FReg) -> Result
fn write_freg(&mut self, reg: FReg) -> Result
Write a single-precision register view.
Source§fn write_dreg(&mut self, reg: DReg) -> Result
fn write_dreg(&mut self, reg: DReg) -> Result
Write a double-precision register view.
Source§fn write_vecreg(&mut self, reg: VecReg) -> Result
fn write_vecreg(&mut self, reg: VecReg) -> Result
Write a vector register view.
Source§fn write_uimm(&mut self, value: u32) -> Result
fn write_uimm(&mut self, value: u32) -> Result
Write an unsigned immediate.
Source§fn write_simm(&mut self, value: i32) -> Result
fn write_simm(&mut self, value: i32) -> Result
Write a signed immediate.
Source§fn write_displacement(&mut self, _encoded: Disp, value: u32) -> Result
fn write_displacement(&mut self, _encoded: Disp, value: u32) -> Result
Write an encoded displacement and its scaled value.
Source§fn write_pc_relative(&mut self, _encoded: Disp, target: Address) -> Result
fn write_pc_relative(&mut self, _encoded: Disp, target: Address) -> Result
Write a resolved PC-relative operand.
Source§fn write_branch(&mut self, target: Address) -> Result
fn write_branch(&mut self, target: Address) -> Result
Write a resolved direct branch destination.
Auto Trait Implementations§
impl Freeze for StringFormatter
impl RefUnwindSafe for StringFormatter
impl Send for StringFormatter
impl Sync for StringFormatter
impl Unpin for StringFormatter
impl UnsafeUnpin for StringFormatter
impl UnwindSafe for StringFormatter
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more