pub trait HistoryRunner {
Show 34 methods
// 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 submit_step_probe(&mut self, request: StepProbeRequest);
fn poll_step_probe(&mut self) -> Option<StepProbeReply>;
fn reset(&mut self);
// Provided methods
fn session_for_main(&mut self, _generation: u64) -> SessionOnMain { ... }
fn submit_plugin_install(&mut self, _request: PluginInstallRequest) -> bool { ... }
fn poll_plugin_install(&mut self) -> Option<PluginInstallReply> { ... }
fn sync_plugins(
&mut self,
_revision: u64,
_fetch: &mut dyn FnMut() -> Value,
) { ... }
fn submit_plugin_action(&mut self, _request: PluginActionRequest) -> bool { ... }
fn poll_plugin_action(&mut self) -> Option<PluginActionReply> { ... }
fn submit_topology(&mut self, _request: TopologyRequest) { ... }
fn poll_topology(&mut self) -> Option<TopologyReply> { ... }
fn wait_topology(&mut self, _timeout: Duration) -> bool { ... }
fn submit_sheet_lines(&mut self, _request: SheetLinesRequest) -> bool { ... }
fn poll_sheet_lines(&mut self) -> Option<SheetLinesReply> { ... }
fn submit_cam(&mut self, _job: CamJob) -> bool { ... }
fn poll_cam(&mut self) -> Option<CamReply> { ... }
fn poll_cam_progress(&mut self) -> Option<CamProgress> { ... }
fn cancel_cam(&mut self) { ... }
fn hold_cam_replies(&mut self, _hold: bool) { ... }
fn submit_cam_sim(&mut self, _job: CamSimJob) -> bool { ... }
fn poll_cam_sim(&mut self) -> Option<CamSimReply> { ... }
fn poll_cam_sim_progress(&mut self) -> Option<CamSimProgress> { ... }
fn cancel_cam_sim(&mut self) { ... }
fn sync_parts_library(
&mut self,
_revision: u64,
_fetch: &mut dyn FnMut() -> PartsLibraryMap,
) { ... }
fn poll_library_request(&mut self) -> bool { ... }
fn run_reply_waiting(&mut self) -> bool { ... }
fn poll_progress(&mut self) -> Option<RunProgress> { ... }
fn cancel(&mut self) -> bool { ... }
}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.
Sourcefn submit_step_probe(&mut self, request: StepProbeRequest)
fn submit_step_probe(&mut self, request: StepProbeRequest)
Submit a STEP product-structure probe (see StepProbeRequest).
Sourcefn poll_step_probe(&mut self) -> Option<StepProbeReply>
fn poll_step_probe(&mut self) -> Option<StepProbeReply>
Non-blocking: the next completed STEP probe, if any.
Provided Methods§
Sourcefn session_for_main(&mut self, _generation: u64) -> SessionOnMain
fn session_for_main(&mut self, _generation: u64) -> SessionOnMain
The assembly session the run of generation left, for the main
thread’s constraint actions. Blocking, but bounded. The default cannot
provide one, and the caller replays the history instead.
fn submit_plugin_install(&mut self, _request: PluginInstallRequest) -> bool
fn poll_plugin_install(&mut self) -> Option<PluginInstallReply>
Sourcefn sync_plugins(&mut self, _revision: u64, _fetch: &mut dyn FnMut() -> Value)
fn sync_plugins(&mut self, _revision: u64, _fetch: &mut dyn FnMut() -> Value)
Trusted installed content, separate from saved document dependency pins.
Sourcefn submit_plugin_action(&mut self, _request: PluginActionRequest) -> bool
fn submit_plugin_action(&mut self, _request: PluginActionRequest) -> bool
False explicitly reports a runner without action support.
fn poll_plugin_action(&mut self) -> Option<PluginActionReply>
Sourcefn submit_topology(&mut self, _request: TopologyRequest)
fn submit_topology(&mut self, _request: TopologyRequest)
Submit a topology request (see TopologyRequest). The default drops
it: a runner that never answers leaves a sheet on its mesh
approximation, which the drawing reports.
Sourcefn poll_topology(&mut self) -> Option<TopologyReply>
fn poll_topology(&mut self) -> Option<TopologyReply>
Non-blocking: the next completed topology reply, if any.
Sourcefn wait_topology(&mut self, _timeout: Duration) -> bool
fn wait_topology(&mut self, _timeout: Duration) -> bool
BLOCK up to timeout until a topology reply is ready to poll: true
when one is. An export that needs the exact solids waits this way on a
runner with a thread of its own; the default cannot wait (a worker
answers through the page’s event loop, which a blocked page never
turns), so the export draws the mesh approximation and the file says
so.
Sourcefn submit_sheet_lines(&mut self, _request: SheetLinesRequest) -> bool
fn submit_sheet_lines(&mut self, _request: SheetLinesRequest) -> bool
Submit a sheet placement’s exact pass (see SheetLinesRequest).
false when this runner cannot run one — the engine then runs it on
its own thread, as every projection did before the pass moved off it.
Sourcefn poll_sheet_lines(&mut self) -> Option<SheetLinesReply>
fn poll_sheet_lines(&mut self) -> Option<SheetLinesReply>
Non-blocking: the next completed sheet-lines reply, if any.
Sourcefn submit_cam(&mut self, _job: CamJob) -> bool
fn submit_cam(&mut self, _job: CamJob) -> bool
Submit ONE CAM operation’s generation (see CamJob); false when
this runner cannot run it.
fn poll_cam(&mut self) -> Option<CamReply>
fn poll_cam_progress(&mut self) -> Option<CamProgress>
Sourcefn cancel_cam(&mut self)
fn cancel_cam(&mut self)
Cancel the CAM job in flight at its next work chunk, where the driver can reach it (the native thread); a driver that cannot lets the job finish and the main side drops its reply.
Sourcefn hold_cam_replies(&mut self, _hold: bool)
fn hold_cam_replies(&mut self, _hold: bool)
TEST HOLD (automation only): while hold, finished CAM replies are
kept back from poll_cam, so a job stays in flight on the main side
however fast it ran — the one way a script can meet it with a cancel
every time. Releasing delivers what was kept, in order. A driver
without the hold ignores it.
Sourcefn submit_cam_sim(&mut self, _job: CamSimJob) -> bool
fn submit_cam_sim(&mut self, _job: CamSimJob) -> bool
Submit ONE CAM simulation command (see CamSimJob); false when
this runner cannot simulate (the caller then simulates inline).
fn poll_cam_sim(&mut self) -> Option<CamSimReply>
fn poll_cam_sim_progress(&mut self) -> Option<CamSimProgress>
Sourcefn cancel_cam_sim(&mut self)
fn cancel_cam_sim(&mut self)
Stop the simulation chunk in flight between two motions where the driver can reach it (the native thread); elsewhere the chunk finishes and the caller drops its reply.
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.
Sourcefn run_reply_waiting(&mut self) -> bool
fn run_reply_waiting(&mut self) -> bool
Whether a run reply (or a refusal asking for the parts library) is
waiting for poll_run: a caller may skip what only a
landing needs while this is false. true when the runner cannot tell.
Sourcefn poll_progress(&mut self) -> Option<RunProgress>
fn poll_progress(&mut self) -> Option<RunProgress>
Non-blocking: the MOST RECENT progress report of the in-flight run, with
any older ones discarded (only the latest feature matters). None for
a synchronous runner — Inline has finished before anyone could ask.
Sourcefn cancel(&mut self) -> bool
fn cancel(&mut self) -> bool
ABANDON the in-flight work and start over with an EMPTY resident
registry. Returns false when there is nothing this runner can abandon
(Inline: the run already completed on the caller’s thread). A true
means every handle the caller holds is now invalid, no reply is coming
for anything submitted so far, and the parts library must be re-sent —
the caller reconciles its generations and pending sets accordingly
(EngineState::cancel_run). Nothing inside a feature is interruptible:
the thread runner lets its old thread finish the feature it is on and
stop at the next boundary; the browser worker is terminated outright.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".