Trait log4rs::encode::Write

source ·
pub trait Write: Write {
    // Provided method
    fn set_style(&mut self, style: &Style) -> Result<()> { ... }
}
Expand description

A trait for types that an Encoder will write to.

It extends std::io::Write and adds some extra functionality.

Provided Methods§

source

fn set_style(&mut self, style: &Style) -> Result<()>

Sets the output text style, if supported.

Writers should ignore any parts of the Style they do not support.

The default implementation returns Ok(()). Implementations that do not support styling should do this as well.

Implementations on Foreign Types§

source§

impl<'a, W: Write + ?Sized> Write for &'a mut W

source§

fn set_style(&mut self, style: &Style) -> Result<()>

Implementors§