Trait tracing_subscriber::registry::SpanData [−][src]
pub trait SpanData<'a> {
fn id(&self) -> Id;
fn metadata(&self) -> &'static Metadata<'static>;
fn parent(&self) -> Option<&Id>ⓘNotable traits for Option<L>impl<L, S> Layer<S> for Option<L> where
L: Layer<S>,
S: Subscriber,
;
fn extensions(&self) -> Extensions<'_>;
fn extensions_mut(&self) -> ExtensionsMut<'_>;
fn is_enabled_for(&self, filter: FilterId) -> bool { ... }
}
Expand description
A stored representation of data associated with a span.
Required methods
Returns a reference to the ID
fn extensions(&self) -> Extensions<'_>
fn extensions(&self) -> Extensions<'_>
Returns a reference to this span’s Extensions
.
The extensions may be used by Layer
s to store additional data
describing the span.
fn extensions_mut(&self) -> ExtensionsMut<'_>
fn extensions_mut(&self) -> ExtensionsMut<'_>
Returns a mutable reference to this span’s Extensions
.
The extensions may be used by Layer
s to store additional data
describing the span.
Provided methods
fn is_enabled_for(&self, filter: FilterId) -> bool
fn is_enabled_for(&self, filter: FilterId) -> bool
This is supported on crate feature
registry
only.Returns true
if this span is enabled for the per-layer filter
corresponding to the provided FilterId
.
Default Implementation
By default, this method assumes that the LookupSpan
implementation
does not support per-layer filtering, and always returns true
.