Trait log4rs::encode::Encode

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

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§

source

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

Encodes the Record into bytes and writes them.

Trait Implementations§

source§

impl Deserializable for dyn Encode

source§

fn name() -> &'static str

Returns a name for objects implementing the trait suitable for display in error messages. Read more

Implementors§