pub trait WriteStr: Write { fn write_str(&mut self, buf: &str) -> Result<()> { ... } }
Add a convenience and optimizing method for writing from str.
str
Like Write::write_all, but takes a &str, allowing implementors which require valid UTF-8 to avoid re-validating the data.
Write::write_all
&str