Decorator

Trait Decorator 

Source
pub trait Decorator:
    Send
    + Sync
    + Sized {
    type RecordDecorator: RecordDecorator;

    // Required method
    fn decorate(&self, record: &Record<'_>) -> Self::RecordDecorator;
}
Expand description

Formatted stream decorator

Some Formats 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.

Required Associated Types§

Source

type RecordDecorator: RecordDecorator

Per-record decorator

Required Methods§

Source

fn decorate(&self, record: &Record<'_>) -> Self::RecordDecorator

Get a RecordDecorator for a given record

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§