Struct slog::Fuse [] [src]

pub struct Fuse<D: Drain>(pub D) where D::Err: Debug;

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> where D::Err: Debug
[src]

Create Fuse wrapping given drain

Trait Implementations

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

Formats the value using the given formatter.

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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

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

Make Self panic when returning any errors Read more