pub struct CodeFormatter { /* private fields */ }
Expand description
A type storing prepared data to improve code formatting speed.
A static instance of CodeFormatter is used by the global format_code. Aquiring this global instance, however, requires thread safety which a single local instance would not.
Implementations§
Source§impl CodeFormatter
impl CodeFormatter
Sourcepub fn new() -> CodeFormatter
pub fn new() -> CodeFormatter
Create a new formatter.
Sourcepub fn format_code(&self, src: &str, dest: &mut String)
pub fn format_code(&self, src: &str, dest: &mut String)
Format MIX assembly.
Auto Trait Implementations§
impl Freeze for CodeFormatter
impl RefUnwindSafe for CodeFormatter
impl Send for CodeFormatter
impl Sync for CodeFormatter
impl Unpin for CodeFormatter
impl UnwindSafe for CodeFormatter
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