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]

[src]

Create Fuse wrapping given drain

Trait Implementations

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

[src]

Formats the value using the given formatter.

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

[src]

Returns a copy of the value. Read more

1.0.0
[src]

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

[src]

Handle one logging statement (Record) Read more

[src]

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

[src]

Filter logging records passed to Drain Read more

[src]

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

[src]

Map logging errors returned by this drain Read more

[src]

Ignore results returned by this drain Read more

[src]

Make Self panic when returning any errors Read more