Struct slog::Fuse [] [src]

pub struct Fuse<D: Drain>(pub D);

Drain panicking on error

Logger requires a root drain to handle all errors (Drain::Error == ()), Fuse will wrap a Drain and panic if it returns any errors.

Note: Drain::Err must implement Display (for displaying on panick). It's easy to create own Fuse drain if this requirement can't be fulfilled.

Methods

impl<D: Drain> Fuse<D>
[src]

Create Fuse wrapping given drain

Trait Implementations

impl<D: Drain> Drain for Fuse<D> where D::Err: Debug
[src]

Type returned by this drain Read more

Type of potential errors that can be returned by this Drain

Handle one logging statement (Record) Read more

Pass Drain through a closure, eg. to wrap into another Drain. Read more

Filter logging records passed to Drain Read more

Filter logging records passed to Drain (by level) Read more

Map logging errors returned by this drain Read more

Ignore results returned by this drain Read more