pub trait Write: Write { fn set_style(&mut self, style: &Style) -> Result<()> { ... } }
A trait for types that an Encoder will write to.
Encode
It extends std::io::Write and adds some extra functionality.
std::io::Write
Sets the output text style, if supported.
Writers should ignore any parts of the Style they do not support.
Write
Style
The default implementation returns Ok(()). Implementations that do not support styling should do this as well.
Ok(())