pub struct LogFilters(/* private fields */);Expand description
Parsed and normalized log filters (trimmed, lowercased, deduplicated).
Semantics (a stable contract):
- An empty set emits no logs (filtering is opt-in, not opt-out).
- The single wildcard word
"all"emits every log. ("*"is not special — there is one wildcard spelling, not two.) - Otherwise a log is emitted iff its lowercased event name starts with any filter string (prefix match).
Consequence to know: a mistyped filter simply matches nothing, so it silently emits no output — that is the documented behavior, not a bug.
Implementations§
Source§impl LogFilters
impl LogFilters
Sourcepub fn new<I, S>(filters: I) -> Self
pub fn new<I, S>(filters: I) -> Self
Create a new LogFilters from filter strings. Entries are trimmed, lowercased, and de-duplicated; empty entries are dropped.
Trait Implementations§
Source§impl Clone for LogFilters
impl Clone for LogFilters
Source§fn clone(&self) -> LogFilters
fn clone(&self) -> LogFilters
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LogFilters
impl Debug for LogFilters
Source§impl Default for LogFilters
impl Default for LogFilters
Source§fn default() -> LogFilters
fn default() -> LogFilters
Returns the “default value” for a type. Read more
impl Eq for LogFilters
Source§impl PartialEq for LogFilters
impl PartialEq for LogFilters
impl StructuralPartialEq for LogFilters
Auto Trait Implementations§
impl Freeze for LogFilters
impl RefUnwindSafe for LogFilters
impl Send for LogFilters
impl Sync for LogFilters
impl Unpin for LogFilters
impl UnsafeUnpin for LogFilters
impl UnwindSafe for LogFilters
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.