[−][src]Struct runtime_fmt::FormatBuf
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]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
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.
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,