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

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

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

fn encode(
    &self,
    w: &mut dyn Write,
    record: &Record
) -> Result<(), Box<dyn Error + Sync + Send>>

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...