pub struct CodeBuilder { /* private fields */ }Implementations§
Source§impl CodeBuilder
impl CodeBuilder
Sourcepub fn add_line<S>(&mut self, line: S)
pub fn add_line<S>(&mut self, line: S)
Adds a single line of code to this code builder, formatting it based on previous code.
Sourcepub fn add_code(&mut self, builder: &CodeBuilder)
pub fn add_code(&mut self, builder: &CodeBuilder)
Adds the result of another CodeBuilder.
Sourcepub fn new() -> CodeBuilder
pub fn new() -> CodeBuilder
Returns a new CodeBuilder.
Sourcepub fn with_indent_size(indent_size: i32) -> CodeBuilder
pub fn with_indent_size(indent_size: i32) -> CodeBuilder
Returns a new CodeBuilder with the given indent size.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CodeBuilder
impl RefUnwindSafe for CodeBuilder
impl Send for CodeBuilder
impl Sync for CodeBuilder
impl Unpin for CodeBuilder
impl UnwindSafe for CodeBuilder
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