pub struct CodeWriter { /* private fields */ }Expand description
Helper for emitting formatted Rust source code with indentation management.
Implementations§
Source§impl CodeWriter
impl CodeWriter
pub fn new() -> Self
Sourcepub fn open_block(&mut self, prefix: &str)
pub fn open_block(&mut self, prefix: &str)
Write an opening brace line and indent.
Sourcepub fn close_block(&mut self)
pub fn close_block(&mut self)
Dedent and write closing brace.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CodeWriter
impl RefUnwindSafe for CodeWriter
impl Send for CodeWriter
impl Sync for CodeWriter
impl Unpin for CodeWriter
impl UnsafeUnpin for CodeWriter
impl UnwindSafe for CodeWriter
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