Trait log4rs::encode::Encode
[−]
[src]
pub trait Encode: Debug + Send + Sync + 'static { fn encode(
&self,
w: &mut Write,
record: &LogRecord
) -> Result<(), Box<Error + Sync + Send>>; }
A trait implemented by types that can serialize a LogRecord
into a
Write
r.
Encode
rs are commonly used by Append
ers to format a log record for
output.
Required Methods
fn encode(
&self,
w: &mut Write,
record: &LogRecord
) -> Result<(), Box<Error + Sync + Send>>
&self,
w: &mut Write,
record: &LogRecord
) -> Result<(), Box<Error + Sync + Send>>
Encodes the LogRecord
into bytes and writes them.
Trait Implementations
impl Deserializable for Encode
[src]
fn name() -> &'static str
Returns a name for objects implementing the trait suitable for display in error messages. Read more
Implementors
impl Encode for JsonEncoder
impl Encode for PatternEncoder