Skip to main content

HistoryRunner

Trait HistoryRunner 

Source
pub trait HistoryRunner {
Show 39 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 poll_mesh_import_phase(&mut self) -> Option<MeshImportPhaseReply> { ... } fn submit_region_fit(&mut self, _job: RegionFitJob) -> bool { ... } fn poll_region_fit(&mut self) -> Option<RegionFitReply> { ... } fn submit_apply_region_choices( &mut self, _job: ApplyRegionChoicesJob, ) -> bool { ... } fn poll_apply_region_choices(&mut self) -> Option<ApplyRegionChoicesReply> { ... } 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§

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 submit_mesh_import(&mut self, request: MeshImportRequest)

Submit RANSAC mesh reconstruction to the runner’s thread/worker.

Source

fn poll_mesh_import(&mut self) -> Option<MeshImportReply>

Non-blocking: the next completed mesh reconstruction, if any.

Source

fn submit_step_probe(&mut self, request: StepProbeRequest)

Submit a STEP product-structure probe (see StepProbeRequest).

Source

fn poll_step_probe(&mut self) -> Option<StepProbeReply>

Non-blocking: the next completed STEP probe, if any.

Source

fn reset(&mut self)

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

Provided Methods§

Source

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.

Source

fn submit_plugin_install(&mut self, _request: PluginInstallRequest) -> bool

Source

fn poll_plugin_install(&mut self) -> Option<PluginInstallReply>

Source

fn sync_plugins(&mut self, _revision: u64, _fetch: &mut dyn FnMut() -> Value)

Trusted installed content, separate from saved document dependency pins.

Source

fn submit_plugin_action(&mut self, _request: PluginActionRequest) -> bool

False explicitly reports a runner without action support.

Source

fn poll_plugin_action(&mut self) -> Option<PluginActionReply>

Source

fn poll_mesh_import_phase(&mut self) -> Option<MeshImportPhaseReply>

Non-blocking: the next phase of an interactive mesh import (MeshImportRequest::phases). The default posts none.

Source

fn submit_region_fit(&mut self, _job: RegionFitJob) -> bool

Submit a region refit; false when this runner cannot run one (the caller then fits on its own thread — a region is small).

Source

fn poll_region_fit(&mut self) -> Option<RegionFitReply>

Non-blocking: the next completed region refit, if any.

Source

fn submit_apply_region_choices(&mut self, _job: ApplyRegionChoicesJob) -> bool

Submit region choices to apply; false when this runner cannot (the caller then applies them on its own thread).

Source

fn poll_apply_region_choices(&mut self) -> Option<ApplyRegionChoicesReply>

Non-blocking: the next applied region choices, if any.

Source

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.

Source

fn poll_topology(&mut self) -> Option<TopologyReply>

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

Source

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.

Source

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.

Source

fn poll_sheet_lines(&mut self) -> Option<SheetLinesReply>

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

Source

fn submit_cam(&mut self, _job: CamJob) -> bool

Submit ONE CAM operation’s generation (see CamJob); false when this runner cannot run it.

Source

fn poll_cam(&mut self) -> Option<CamReply>

Source

fn poll_cam_progress(&mut self) -> Option<CamProgress>

Source

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.

Source

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.

Source

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).

Source

fn poll_cam_sim(&mut self) -> Option<CamSimReply>

Source

fn poll_cam_sim_progress(&mut self) -> Option<CamSimProgress>

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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".

Implementors§

Source§

impl HistoryRunner for InlineRunner

Source§

impl HistoryRunner for ThreadRunner

Available on non-WebAssembly only.