Trait utf8_io::WriteStr

source ·
pub trait WriteStr: Write {
    // Provided method
    fn write_str(&mut self, buf: &str) -> Result<()> { ... }
}
Expand description

Add a convenience and optimizing method for writing from str.

Provided Methods§

source

fn write_str(&mut self, buf: &str) -> Result<()>

Like Write::write_all, but takes a &str, allowing implementors which require valid UTF-8 to avoid re-validating the data.

Implementors§

source§

impl<Inner: Write> WriteStr for Utf8Writer<Inner>

source§

impl<Inner: HalfDuplex> WriteStr for Utf8Duplexer<Inner>