std::write!
[-]
[+]
[src]
macro_rules! write( ($dst:expr, $($arg:tt)*) => ({ let dst = &mut *$dst; format_args!(|args| { dst.write_fmt(args) }, $($arg)*) }) )
Use the format! syntax to write data into a buffer of type &mut Writer.
See std::fmt for more information.
Example
fn main() { #![allow(unused_must_use)] let mut w = Vec::new(); write!(&mut w, "test"); write!(&mut w, "formatted {}", "arguments"); }let mut w = Vec::new(); write!(&mut w, "test"); write!(&mut w, "formatted {}", "arguments");