Struct tracing_subscriber::filter::combinator::Or
source · [−]pub struct Or<A, B, S> { /* private fields */ }
Expand description
Combines two Filter
s so that spans and events are enabled if either filter
returns true
.
This type is typically returned by the FilterExt::or
method. See that
method’s documentation for details.
Trait Implementations
sourceimpl<A, B, S> Filter<S> for Or<A, B, S>where
A: Filter<S>,
B: Filter<S>,
impl<A, B, S> Filter<S> for Or<A, B, S>where
A: Filter<S>,
B: Filter<S>,
sourcefn enabled(&self, meta: &Metadata<'_>, cx: &Context<'_, S>) -> bool
fn enabled(&self, meta: &Metadata<'_>, cx: &Context<'_, S>) -> bool
Returns
true
if this layer is interested in a span or event with the
given Metadata
in the current Context
, similarly to
Subscriber::enabled
. Read moresourcefn callsite_enabled(&self, meta: &'static Metadata<'static>) -> Interest
fn callsite_enabled(&self, meta: &'static Metadata<'static>) -> Interest
sourcefn max_level_hint(&self) -> Option<LevelFilter>
fn max_level_hint(&self) -> Option<LevelFilter>
sourcefn event_enabled(&self, event: &Event<'_>, cx: &Context<'_, S>) -> bool
fn event_enabled(&self, event: &Event<'_>, cx: &Context<'_, S>) -> bool
Called before the filtered [
Layer]'s [
on_event], to determine if
on_event` should be called. Read moresourcefn on_new_span(&self, attrs: &Attributes<'_>, id: &Id, ctx: Context<'_, S>)
fn on_new_span(&self, attrs: &Attributes<'_>, id: &Id, ctx: Context<'_, S>)
sourcefn on_enter(&self, id: &Id, ctx: Context<'_, S>)
fn on_enter(&self, id: &Id, ctx: Context<'_, S>)
Notifies this filter that a span with the given ID was entered. Read more
Auto Trait Implementations
impl<A, B, S> RefUnwindSafe for Or<A, B, S>where
A: RefUnwindSafe,
B: RefUnwindSafe,
impl<A, B, S> Send for Or<A, B, S>where
A: Send,
B: Send,
impl<A, B, S> Sync for Or<A, B, S>where
A: Sync,
B: Sync,
impl<A, B, S> Unpin for Or<A, B, S>where
A: Unpin,
B: Unpin,
impl<A, B, S> UnwindSafe for Or<A, B, S>where
A: UnwindSafe,
B: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more