Trait Handler
Source pub trait Handler: Send + Sync {
// Required methods
fn handle(&self, record: &Record<'_>);
fn formatter(&self) -> &Formatter;
}
Expand description
A sink for log records. Implementors render the record (via their
Formatter) and deliver it somewhere (stdout, a file, …).
Handlers are shared across threads (Send + Sync) since a logger may
be logged to concurrently.
Renders and writes a single record.
The formatter this handler uses (the logger reads its time_format).
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".