pub trait RecordFilter: Send + 'static {
// Required method
fn check(&self, record: &Record) -> bool;
// Provided method
fn fmt_debug(&self, f: &mut Formatter<'_>) -> Result { ... }
}Expand description
Trait for filtering log records in LoggedStream.
This trait allows filtering log records (Record) using the check method, which returns a bool value.
It should be implemented for structures intended to be used as the filtering component within LoggedStream.
Required Methods§
Provided Methods§
Sourcefn fmt_debug(&self, f: &mut Formatter<'_>) -> Result
fn fmt_debug(&self, f: &mut Formatter<'_>) -> Result
This method provides fmt::Debug representation of the filter. It is used by composite filters
(AllFilter and AnyFilter) to produce detailed debug output of their underlying filters.
The default implementation outputs the type name as "UnknownFilter".
Implementors are encouraged to override this method to provide meaningful debug information.