tracing_capture::predicates

Trait ScanExt

Source
pub trait ScanExt<'a>: Sized {
    // Required methods
    fn scan_spans(self) -> Scanner<Self, CapturedSpans<'a>>;
    fn scan_events(self) -> Scanner<Self, CapturedEvents<'a>>;
}
Expand description

Helper to wrap holders of CapturedSpans or CapturedEvents (spans or the underlying Storage) so that they are more convenient to use with Predicates.

See the module-level docs for examples of usage.

Required Methods§

Source

fn scan_spans(self) -> Scanner<Self, CapturedSpans<'a>>

Creates a scanner for the spans contained by this holder. What is meant by “contained” (i.e., whether the scan is deep or shallow), depends on the holder type and is documented at the corresponding impl.

Source

fn scan_events(self) -> Scanner<Self, CapturedEvents<'a>>

Creates a scanner for the events contained by this holder. What is meant by “contained” (i.e., whether the scan is deep or shallow), depends on the holder type and is documented at the corresponding impl.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<'a> ScanExt<'a> for &'a Storage

Scans for Storage are deep; they include all captured spans / events, not just root ones.

Source§

impl<'a> ScanExt<'a> for CapturedSpan<'a>

Scans for CapturedSpan are shallow, i.e. include only direct children spans / events.