Trait slog_term::Decorator
[−]
[src]
pub trait Decorator { fn with_record<F>(
&self,
_record: &Record,
_logger_values: &OwnedKVList,
f: F
) -> Result<()>
where
F: FnOnce(&mut RecordDecorator) -> Result<()>; }
Output decorator
Trait implementing strategy of output formating in terms of IO, colors, etc.
Required Methods
fn with_record<F>(
&self,
_record: &Record,
_logger_values: &OwnedKVList,
f: F
) -> Result<()> where
F: FnOnce(&mut RecordDecorator) -> Result<()>,
&self,
_record: &Record,
_logger_values: &OwnedKVList,
f: F
) -> Result<()> where
F: FnOnce(&mut RecordDecorator) -> Result<()>,
Get a RecordDecorator
for a given record
This allows Decorator
to have on-stack data per processed Record
s
Implementors
impl<T: ?Sized> Decorator for Box<T> where
T: Decorator,impl<W> Decorator for PlainDecorator<W> where
W: Write + Send + 'static,impl<W> Decorator for PlainSyncDecorator<W> where
W: Write + Send + 'static,impl Decorator for TermDecorator