Struct runtime_fmt::FormatBuf
[−]
[src]
pub struct FormatBuf<'s> { /* fields omitted */ }
A buffer representing a parsed format string and arguments.
Methods
impl<'s> FormatBuf<'s>
[src]
fn new(spec: &'s str, params: &'s [Param<'s>]) -> Result<Self, Error<'s>>
Construct a new buffer from the given format string and arguments.
This method should usually not be called directly. Instead use the
rt_format_args!
macro.
fn newln(&mut self) -> &mut Self
Append a linefeed (\n
) to the end of this buffer.
fn with<F: FnOnce(Arguments) -> R, R>(&self, f: F) -> R
Call a function accepting Arguments
with the contents of this buffer.
fn format(&self) -> String
Format this buffer to a String
.
fn print(&self)
Print this buffer to standard output.
fn write_io<W: Write + ?Sized>(&self, dest: &mut W) -> Result<()>
Write this buffer to an io::Write
.
fn write_fmt<W: Write + ?Sized>(&self, dest: &mut W) -> Result
Write this buffer to a fmt::Write
.
Trait Implementations
impl<'s> Clone for FormatBuf<'s>
[src]
fn clone(&self) -> FormatBuf<'s>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more