[−][src]Struct codegen_rs::Formatter
Configures how a scope is formatted.
Implementations
impl<'a> Formatter<'a>
[src]
pub fn new(dst: &'a mut String) -> Self
[src]
Return a new formatter that writes to the given string.
pub fn block<F>(&mut self, f: F) -> Result where
F: FnOnce(&mut Self) -> Result,
[src]
F: FnOnce(&mut Self) -> Result,
Wrap the given function inside a block.
pub fn indent<F, R>(&mut self, f: F) -> R where
F: FnOnce(&mut Self) -> R,
[src]
F: FnOnce(&mut Self) -> R,
Call the given function with the indentation level incremented by one.
pub fn is_start_of_line(&self) -> bool
[src]
Check if current destination is the start of a new line.
Trait Implementations
Auto Trait Implementations
impl<'a> RefUnwindSafe for Formatter<'a>
[src]
impl<'a> Send for Formatter<'a>
[src]
impl<'a> Sync for Formatter<'a>
[src]
impl<'a> Unpin for Formatter<'a>
[src]
impl<'a> !UnwindSafe for Formatter<'a>
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,