Trait tracing_capture::predicates::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.

Object Safety§

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.