Trait slog::DrainExt
[−]
[src]
pub trait DrainExt: Sized + Drain { fn map_err<F, E>(self, f: F) -> MapError<Self, E> where F: 'static + Sync + Send + Fn(Self::Error) -> E { ... } fn ignore_err(self) -> IgnoreErr<Self> { ... } fn fuse(self) -> Fuse<Self> where Self::Error: Display { ... } }
Convenience methods for building drains
DrainExt
is implemented for every Drain
and contains
convenience methods.
Provided Methods
fn map_err<F, E>(self, f: F) -> MapError<Self, E> where F: 'static + Sync + Send + Fn(Self::Error) -> E
Map logging errors returned by this drain
f
is a closure that takes Drain::Error
returned by a given
drain, and returns new error of potentially different type
fn ignore_err(self) -> IgnoreErr<Self>
Make Self
ignore and not report any error
fn fuse(self) -> Fuse<Self> where Self::Error: Display
Make Self
panic when returning any errors
Implementors
impl<D: Drain> DrainExt for D