pub struct LogFilters(/* private fields */);Expand description
Parsed and normalized log filters (trimmed, lowercased, deduplicated).
Normalization is ASCII-only in every SDK: entries are trimmed of ASCII whitespace (space, tab, LF, FF, CR) and only ASCII letters are lowercased. Event names are identifiers, and Unicode case mapping and whitespace sets differ between runtimes, so a filter must not select different events depending on which SDK parsed it.
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 (ASCII whitespace), lowercased (ASCII letters), and de-duplicated; empty entries are dropped. The set is immutable afterwards.
Trait Implementations§
Source§impl Clone for LogFilters
impl Clone for LogFilters
Source§impl Debug for LogFilters
impl Debug for LogFilters
Source§impl Default for LogFilters
impl Default for LogFilters
impl Eq for LogFilters
Source§impl PartialEq for LogFilters
impl PartialEq for LogFilters
impl StructuralPartialEq for LogFilters
Auto Trait Implementations§
impl Forget for LogFilters
impl Freeze for LogFilters
impl Move for LogFilters
impl RefUnwindSafe for LogFilters
impl Send for LogFilterswhere
RawVecInner: Send,
impl Sync for LogFilterswhere
RawVecInner: Sync,
impl Unpin for LogFilters
impl UnsafeUnpin for LogFilters
impl UnwindSafe for LogFilterswhere
RawVecInner: UnwindSafe,
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
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
key and return true if they are equal.