Struct slog::Filter [] [src]

pub struct Filter<D: Drain, F>(pub D, pub F)
where
    F: Fn(&Record) -> bool + 'static + Send + Sync
;

Drain filtering records

Wraps another Drain and passes Records to it, only if they satisfy a given condition.

Methods

impl<D: Drain, F> Filter<D, F> where
    F: FilterFn
[src]

[src]

Create Filter wrapping given drain

Trait Implementations

impl<D: Debug + Drain, F: Debug> Debug for Filter<D, F> where
    F: Fn(&Record) -> bool + 'static + Send + Sync
[src]

[src]

Formats the value using the given formatter.

impl<D: Clone + Drain, F: Clone> Clone for Filter<D, F> where
    F: Fn(&Record) -> bool + 'static + Send + Sync
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl<D: Drain, F> Drain for Filter<D, F> where
    F: FilterFn
[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