Trait tracing_subscriber::registry::LookupSpan [−][src]
pub trait LookupSpan<'a> { type Data: SpanData<'a>; fn span_data(&'a self, id: &Id) -> Option<Self::Data>; fn span(&'a self, id: &Id) -> Option<SpanRef<'_, Self>>
where
Self: Sized, { ... } }
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
.
Implementors
This is supported on crate feature
registry
only.impl<'a, N, E, F, W> LookupSpan<'a> for Subscriber<N, E, F, W> where
Layered<F, Formatter<N, E, W>>: LookupSpan<'a>,
[src]
impl<'a, N, E, F, W> LookupSpan<'a> for Subscriber<N, E, F, W> where
Layered<F, Formatter<N, E, W>>: LookupSpan<'a>,
[src]This is supported on crate feature
fmt
only.