Trait tracing_subscriber::registry::LookupSpan
source · [−]pub trait LookupSpan<'a> {
type Data: SpanData<'a>;
fn span_data(&'a self, id: &Id) -> Option<Self::Data>ⓘNotable traits for Option<L>impl<L, S> Layer<S> for Option<L> where
L: Layer<S>,
S: Subscriber, ;
fn span(&'a self, id: &Id) -> Option<SpanRef<'_, Self>>ⓘNotable traits for Option<L>impl<L, S> Layer<S> for Option<L> where
L: Layer<S>,
S: Subscriber,
where
Self: Sized,
{ ... }
fn register_filter(&mut self) -> FilterId { ... }
}Expand description
Associated Types
Required methods
Provided methods
Returns a SpanRef for the span with the given Id, if it exists.
A SpanRef is similar to SpanData, but it allows performing
additional lookups against the registryr that stores the wrapped data.
In general, users of the LookupSpan trait should use this method
rather than the span_data method; while implementors of this trait
should only implement span_data.
fn register_filter(&mut self) -> FilterId
fn register_filter(&mut self) -> FilterId
This is supported on crate feature
registry only.Registers a Filter for per-layer filtering with this
Subscriber.
The Filter can then use the returned FilterId to
check if it previously enabled a span.
Panics
If this Subscriber does not support per-layer filtering.
Implementors
sourceimpl<'a> LookupSpan<'a> for Registry
This is supported on crate features registry and std only.
impl<'a> LookupSpan<'a> for Registry
This is supported on crate features
registry and std only.sourceimpl<'a, L, S> LookupSpan<'a> for Layered<L, S> where
S: Subscriber + LookupSpan<'a>,
impl<'a, L, S> LookupSpan<'a> for Layered<L, S> where
S: Subscriber + LookupSpan<'a>,
sourceimpl<'a, N, E, F, W> LookupSpan<'a> for Subscriber<N, E, F, W> where
Layered<F, Formatter<N, E, W>>: LookupSpan<'a>,
This is supported on crate features fmt and std only.
impl<'a, N, E, F, W> LookupSpan<'a> for Subscriber<N, E, F, W> where
Layered<F, Formatter<N, E, W>>: LookupSpan<'a>,
This is supported on crate features
fmt and std only.