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 submit_mesh_import(&mut self, request: MeshImportRequest);
fn poll_mesh_import(&mut self) -> Option<MeshImportReply>;
fn reset(&mut self);
// Provided methods
fn sync_parts_library(
&mut self,
_revision: u64,
_fetch: &mut dyn FnMut() -> PartsLibraryMap,
) { ... }
fn poll_library_request(&mut self) -> bool { ... }
}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§
Sourcefn submit_run(&mut self, request: HistoryRequest, generation: u64)
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.
Sourcefn poll_run(&mut self) -> Option<RunReply>
fn poll_run(&mut self) -> Option<RunReply>
Non-blocking: the next completed run reply, if any (drained each frame).
Sourcefn submit_query(&mut self, query: MeasureQuery)
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.
Sourcefn poll_query(&mut self) -> Option<MeasureReply>
fn poll_query(&mut self) -> Option<MeasureReply>
Non-blocking: the next completed measurement reply, if any.
Sourcefn submit_mesh_import(&mut self, request: MeshImportRequest)
fn submit_mesh_import(&mut self, request: MeshImportRequest)
Submit RANSAC mesh reconstruction to the runner’s thread/worker.
Sourcefn poll_mesh_import(&mut self) -> Option<MeshImportReply>
fn poll_mesh_import(&mut self) -> Option<MeshImportReply>
Non-blocking: the next completed mesh reconstruction, if any.
Provided Methods§
Sourcefn sync_parts_library(
&mut self,
_revision: u64,
_fetch: &mut dyn FnMut() -> PartsLibraryMap,
)
fn sync_parts_library( &mut self, _revision: u64, _fetch: &mut dyn FnMut() -> PartsLibraryMap, )
Bring the runner’s resident PARTS LIBRARY up to revision, calling
fetch ONLY when it is not already there. Called immediately before
every submit_run.
This is the whole point of the library channel: the library is sent
when it CHANGES (insert, document load, refresh), not on every run.
Cheap to call — the revision comparison is an integer, and fetch
(which clones the store) never runs in the steady state. The default is
a no-op for InlineRunner, which shares the caller’s kernel store.
Sourcefn poll_library_request(&mut self) -> bool
fn poll_library_request(&mut self) -> bool
True when the runner REFUSED a run because its resident parts library
could not serve it (see Reply::NeedPartsLibrary). It has already
forgotten its copy, so the next sync_parts_library reinstalls; the
caller must re-submit the run. Never true for a runner that shares the
caller’s store.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".