Encode

Trait 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

Available on crate feature config_parsing only.
Source§

fn name() -> &'static str

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

Implementors§