Struct slog::MapError
[−]
[src]
pub struct MapError<D: Drain, E> { // some fields omitted }
Map error of a Drain
Methods
impl<D: Drain, E> MapError<D, E>
[src]
fn new<F: 'static + Sync + Send + Fn(D::Error) -> E>(drain: D, map_fn: F) -> Self
Create Filter wrapping given subdrain
and passing to it records
only the cond
is true
Trait Implementations
impl<D: Drain, E> Drain for MapError<D, E>
[src]
type Error = E
Type of potential error returned during logging
fn log(&self, info: &Record, logger_values: &OwnedKeyValueList) -> Result<(), Self::Error>
Write one logging record As an optimization (avoiding allocations), loggers are responsible for providing a byte buffer, that Drain
can use for their own needs. Read more