Skip to main content

HistoryRunner

Trait HistoryRunner 

Source
pub trait HistoryRunner {
    // Required methods
    fn submit_run(&mut self, request: HistoryRequest, generation: u64);
    fn poll_run(&mut self) -> Option<RunReply>;
    fn submit_query(&mut self, query: MeasureQuery);
    fn poll_query(&mut self) -> Option<MeasureReply>;
    fn reset(&mut self);
}
Expand description

The history-run seam: SUBMIT a run, POLL for its completed reply, RESET the delta baseline, plus a QUERY channel for per-object measurements (routed to the runner so the warm registry answers them, never the cold main-side one). The Inline impl runs everything synchronously; a later thread/worker impl defers the work and surfaces the replies through the same poll idiom.

Required Methods§

Source

fn submit_run(&mut self, request: HistoryRequest, generation: u64)

Submit a history run tagged with a monotonic generation. The runner executes it (immediately for Inline; on a background thread later) and makes the reply available via poll_run.

Source

fn poll_run(&mut self) -> Option<RunReply>

Non-blocking: the next completed run reply, if any (drained each frame).

Source

fn submit_query(&mut self, query: MeasureQuery)

Submit a per-object measurement query (answered against the runner’s warm registry). Inline computes it immediately; a thread impl computes it on the runner thread and surfaces it via poll_query.

Source

fn poll_query(&mut self) -> Option<MeasureReply>

Non-blocking: the next completed measurement reply, if any.

Source

fn reset(&mut self)

Drop the delta baseline (document switch → full rebuild).

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl HistoryRunner for InlineRunner

Source§

impl HistoryRunner for ThreadRunner

Available on non-WebAssembly only.