Trait slog_term::Decorator [−][src]
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 dyn RecordDecorator) -> Result<()>,
[src]
&self,
_record: &Record<'_>,
_logger_values: &OwnedKVList,
f: F
) -> Result<()> where
F: FnOnce(&mut dyn RecordDecorator) -> Result<()>,
Get a RecordDecorator
for a given record
This allows Decorator
to have on-stack data per processed Record
s
Implementations on Foreign Types
impl<T: ?Sized> Decorator for Box<T> where
T: Decorator,
[src]
T: Decorator,
fn with_record<F>(
&self,
record: &Record<'_>,
logger_kv: &OwnedKVList,
f: F
) -> Result<()> where
F: FnOnce(&mut dyn RecordDecorator) -> Result<()>,
[src]
&self,
record: &Record<'_>,
logger_kv: &OwnedKVList,
f: F
) -> Result<()> where
F: FnOnce(&mut dyn RecordDecorator) -> Result<()>,
Implementors
impl Decorator for TermDecorator
[src]
fn with_record<F>(
&self,
record: &Record<'_>,
_logger_values: &OwnedKVList,
f: F
) -> Result<()> where
F: FnOnce(&mut dyn RecordDecorator) -> Result<()>,
[src]
&self,
record: &Record<'_>,
_logger_values: &OwnedKVList,
f: F
) -> Result<()> where
F: FnOnce(&mut dyn RecordDecorator) -> Result<()>,
impl<W> Decorator for PlainDecorator<W> where
W: Write,
[src]
W: Write,
fn with_record<F>(
&self,
_record: &Record<'_>,
_logger_values: &OwnedKVList,
f: F
) -> Result<()> where
F: FnOnce(&mut dyn RecordDecorator) -> Result<()>,
[src]
&self,
_record: &Record<'_>,
_logger_values: &OwnedKVList,
f: F
) -> Result<()> where
F: FnOnce(&mut dyn RecordDecorator) -> Result<()>,
impl<W> Decorator for PlainSyncDecorator<W> where
W: Write,
[src]
W: Write,
fn with_record<F>(
&self,
_record: &Record<'_>,
_logger_values: &OwnedKVList,
f: F
) -> Result<()> where
F: FnOnce(&mut dyn RecordDecorator) -> Result<()>,
[src]
&self,
_record: &Record<'_>,
_logger_values: &OwnedKVList,
f: F
) -> Result<()> where
F: FnOnce(&mut dyn RecordDecorator) -> Result<()>,