fn with_spans(&self, f: impl FnMut(&'static Metadata<'static>, &str) -> bool) {
        self.span.with_subscriber(|(id, s)| {
            if let Some(getcx) = s.downcast_ref::<WithContext>() {
                getcx.with_context(s, id, f);
            }
        });
    }
/// 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.
///
/// [fields]: https://docs.rs/tracing/latest/tracing/field/index.html
/// [`Metadata`]: https://docs.rs/tracing/latest/tracing/struct.Metadata.html
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.


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 .
fn with_spans(&self, f: impl FnMut(&'static Metadata<'static>, &str) -> bool) {
        self.span.with_subscriber(|(id, s)| {
            if let Some(getcx) = s.downcast_ref::<WithContext>() {
                getcx.with_context(s, id, f);
            }
        });
    }
fn with_spans ( & self , f : impl FnMut ( & ' static Metadata < ' static > , & str ) -> bool ) { self . span . with_subscriber ( | ( id , s ) | { if let Some ( getcx ) = s . downcast_ref :: < WithContext > ( ) { getcx . with_context ( s , id , f ) ; } } ) ; }
Apply a function to all captured spans in the trace until it returns
`false`.
Apply a function to all captured spans in the trace until it returns ` false ` .
&self
f
impl FnMut(&'static Metadata<'static>, &str) -> bool
&self
f
impl FnMut(&'static Metadata<'static>, &str) -> bool