pub struct Filter { /* private fields */ }Expand description
Parses and evaluates METRICS_FILTER-style directives.
Filter string: comma-separated pattern=LEVEL directives, last-match
wins, a metric is exposed when its own level is at or below the threshold.
Implementations§
Source§impl Filter
impl Filter
Sourcepub fn parse(s: &str) -> Self
pub fn parse(s: &str) -> Self
Parses a directive string, ignoring the METRICS_FILTER env var; use
Filter::resolve to honour it.
Sourcepub fn is_exposed(&self, name: &str, module: &str, level: MetricLevel) -> bool
pub fn is_exposed(&self, name: &str, module: &str, level: MetricLevel) -> bool
Returns true if a registered metric named name in module at
verbosity level should be exposed when gathering.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Filter
impl RefUnwindSafe for Filter
impl Send for Filter
impl Sync for Filter
impl Unpin for Filter
impl UnsafeUnpin for Filter
impl UnwindSafe for Filter
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more