Struct genco::Formatter
[−]
[src]
pub struct Formatter<'write> { /* fields omitted */ }
Formatter implementation for write types.
Methods
impl<'write> Formatter<'write>
[src]
fn new(write: &mut Write) -> Formatter
[src]
Create a new write formatter.
fn write_str(&mut self, s: &str) -> Result
[src]
Write the given string.
fn new_line(&mut self) -> Result
[src]
Push a new line.
fn new_line_unless_empty(&mut self) -> Result
[src]
Push a new line, unless the current line is empty.
fn indent(&mut self)
[src]
Increase indentation level.
fn unindent(&mut self)
[src]
Decrease indentation level.
Trait Implementations
impl<'write> Write for Formatter<'write>
[src]
fn write_str(&mut self, s: &str) -> Result
[src]
Writes a slice of bytes into this writer, returning whether the write succeeded. Read more
fn write_char(&mut self, c: char) -> Result<(), Error>
1.1.0[src]
Writes a [char
] into this writer, returning whether the write succeeded. Read more
fn write_fmt(&mut self, args: Arguments) -> Result<(), Error>
1.0.0[src]
Glue for usage of the [write!
] macro with implementors of this trait. Read more