pub trait Captured<'a>: Eq + PartialOrd + Sealed {
    fn metadata(&self) -> &'static Metadata<'static>;
    fn value(&self, name: &str) -> Option<&'a TracedValue>;
    fn parent(&self) -> Option<CapturedSpan<'a>>;
}
Expand description

Uniting trait for CapturedSpans and CapturedEvents that allows writing generic code in cases both should be supported.

Required Methods§

Provides a reference to the span / event metadata.

Returns a value for the specified field, or None if the value is not defined.

Returns the reference to the parent span, if any.

Implementors§