[][src]Struct runtime_fmt::FormatBuf

pub struct FormatBuf<'s> { /* fields omitted */ }

A buffer representing a parsed format string and arguments.

Methods

impl<'s> FormatBuf<'s>[src]

pub fn new(spec: &'s str, params: &'s [Param<'s>]) -> Result<Self, Error<'s>>[src]

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.

pub fn newln(&mut self) -> &mut Self[src]

Append a linefeed (\n) to the end of this buffer.

pub fn with<F: FnOnce(Arguments) -> R, R>(&self, f: F) -> R[src]

Call a function accepting Arguments with the contents of this buffer.

pub fn format(&self) -> String[src]

Format this buffer to a String.

pub fn print(&self)[src]

Print this buffer to standard output.

pub fn write_io<W: Write + ?Sized>(&self, dest: &mut W) -> Result<()>[src]

Write this buffer to an io::Write.

pub fn write_fmt<W: Write + ?Sized>(&self, dest: &mut W) -> Result[src]

Write this buffer to a fmt::Write.

Trait Implementations

impl<'s> Clone for FormatBuf<'s>[src]

impl<'a> Debug for FormatBuf<'a>[src]

impl<'a> Display for FormatBuf<'a>[src]

Auto Trait Implementations

impl<'s> !Send for FormatBuf<'s>

impl<'s> Unpin for FormatBuf<'s>

impl<'s> !Sync for FormatBuf<'s>

impl<'s> !UnwindSafe for FormatBuf<'s>

impl<'s> !RefUnwindSafe for FormatBuf<'s>

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]