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> Clone for Or<A, B, S> where
A: Clone,
B: Clone,
This is supported on crate features registry
and std
only.
impl<A, B, S> Clone for Or<A, B, S> where
A: Clone,
B: Clone,
registry
and std
only.sourceimpl<A, B, S> Debug for Or<A, B, S> where
A: Debug,
B: Debug,
This is supported on crate features registry
and std
only.
impl<A, B, S> Debug for Or<A, B, S> where
A: Debug,
B: Debug,
registry
and std
only.sourceimpl<A, B, S> Filter<S> for Or<A, B, S> where
A: Filter<S>,
B: Filter<S>,
This is supported on crate features registry
and std
only.
impl<A, B, S> Filter<S> for Or<A, B, S> where
A: Filter<S>,
B: Filter<S>,
registry
and std
only.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 more
sourcefn callsite_enabled(&self, meta: &'static Metadata<'static>) -> Interest
fn callsite_enabled(&self, meta: &'static Metadata<'static>) -> Interest
sourcefn max_level_hint(&self) -> Option<LevelFilter>ⓘNotable traits for Option<L>impl<L, S> Layer<S> for Option<L> where
L: Layer<S>,
S: Subscriber,
fn max_level_hint(&self) -> Option<LevelFilter>ⓘNotable traits for Option<L>impl<L, S> Layer<S> for Option<L> where
L: Layer<S>,
S: Subscriber,
L: Layer<S>,
S: Subscriber,
Returns an optional hint of the highest verbosity level that
this Filter
will enable. Read more
sourcefn on_new_span(&self, attrs: &Attributes<'_>, id: &Id, ctx: Context<'_, S>)
fn on_new_span(&self, attrs: &Attributes<'_>, id: &Id, ctx: Context<'_, S>)
Notifies this filter that a new span was constructed with the given
Attributes
and Id
. Read more
sourcefn on_record(&self, id: &Id, values: &Record<'_>, ctx: Context<'_, S>)
fn on_record(&self, id: &Id, values: &Record<'_>, ctx: Context<'_, S>)
Notifies this filter that a span with the given Id
recorded the given
values
. Read more
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 T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
Uses borrowed data to replace owned data, usually by cloning. Read more
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more