pub fn write_text(writer: impl Write, text: &str) -> Result<()>
Writes text to a generic writer.
Returns any I/O error reported by writer.
writer