Function std::fmt::write
pub fn write(output: &mut Writer, args: &Arguments) -> Result
The write
function takes an output stream, a precompiled format string,
and a list of arguments. The arguments will be formatted according to the
specified format string into the output stream provided.
Arguments
- output - the buffer to write output to
- args - the precompiled arguments generated by
format_args!
Example
use std::fmt; use std::io; let mut w = io::stdout(); format_args!(|args| { fmt::write(&mut w, args); }, "Hello, {}!", "world");