pub struct SpanTrace(/* private fields */);
Methods from Deref<Target = SpanTrace>§
pub fn with_spans(
&self,
f: impl FnMut(&'static Metadata<'static>, &str) -> bool,
)
pub fn with_spans( &self, f: impl FnMut(&'static Metadata<'static>, &str) -> bool, )
Apply a function to all captured spans in the trace until it returns
false
.
This will call the provided function with a reference to the
Metadata
and a formatted representation of the fields of each span
captured in the trace, starting with the span that was current when the
trace was captured. The function may return true
or false
to
indicate whether to continue iterating over spans; if it returns
false
, no additional spans will be visited.
pub fn status(&self) -> SpanTraceStatus
pub fn status(&self) -> SpanTraceStatus
Returns the status of this SpanTrace
.
The status indicates one of the following:
- the current subscriber does not support capturing
SpanTrace
s - there was no current span, so a trace was not captured
- a span trace was successfully captured
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SpanTrace
impl !RefUnwindSafe for SpanTrace
impl Send for SpanTrace
impl Sync for SpanTrace
impl Unpin for SpanTrace
impl !UnwindSafe for SpanTrace
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more