Skip to main content

TraceQuery

Trait TraceQuery 

Source
pub trait TraceQuery {
    // Required methods
    fn len(&self, name: &str) -> usize;
    fn since(&self, name: &str, cursor: &Cell<usize>) -> Vec<TraceEvent>;
    fn snapshot(&self, name: &str) -> Vec<TraceEvent>;
}
Expand description

Read-only view of captured trace events provided to invariants.

Required Methods§

Source

fn len(&self, name: &str) -> usize

Total number of events captured under name.

Source

fn since(&self, name: &str, cursor: &Cell<usize>) -> Vec<TraceEvent>

Return clones of events named name past cursor, and advance the cursor to the new end.

Cursors index into the per-name event list and stay stable within a seed; reset them in Invariant::reset.

Source

fn snapshot(&self, name: &str) -> Vec<TraceEvent>

All events captured under name since the start of the seed. Convenience for full re-scans; prefer since when an incremental cursor will do.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§