[][src]Trait log4rs::encode::Encode

pub trait Encode: Debug + Send + Sync + 'static {
    pub fn encode(&self, w: &mut dyn Write, record: &Record<'_>) -> Result<()>;
}

A trait implemented by types that can serialize a Record into a Writer.

Encoders are commonly used by Appenders to format a log record for output.

Required methods

pub fn encode(&self, w: &mut dyn Write, record: &Record<'_>) -> Result<()>[src]

Encodes the Record into bytes and writes them.

Loading content...

Trait Implementations

impl Deserializable for dyn Encode[src]

Implementors

impl Encode for JsonEncoder[src]

impl Encode for PatternEncoder[src]

Loading content...