Trait slog_stream::Decorator
[−]
[src]
pub trait Decorator: Send + Sync + Sized { type RecordDecorator: RecordDecorator; fn decorate(&self, record: &Record) -> Self::RecordDecorator; }
Formatted stream decorator
Some Format
s for which it make sense can use this to parametrize
themselves on the exact behavior of formatting parts of the output. This
can be used eg. to use color when displaying logger records on the terminal.
Associated Types
type RecordDecorator: RecordDecorator
Per-record decorator
Required Methods
fn decorate(&self, record: &Record) -> Self::RecordDecorator
Get a RecordDecorator
for a given record