Expand description
Lifecycle-driven runtime for WidgetKit. The current runtime scope is intentionally a single widget instance per app/host pair. All timers and background tasks belong to that widget instance and are shut down with it. Rendering is demand-driven and redraw requests are coalesced until the pending frame is consumed.
Redraw invalidation model:
request_render()marks the current frame dirty.- repeated render requests before the host consumes the pending frame are coalesced.
- hosts should request redraws on demand instead of running a permanent render loop.
shutdownclears pending redraw state beforedisposecompletes.- late messages, timer completions, task completions, and render requests are ignored once their widget instance token no longer matches the live instance.
Re-exports§
pub use widgetkit_core;
Structs§
- AppRunner
- Runtime runner for one widget instance lifetime.
Timers and tasks are instance-owned and are shut down with
stop/dispose. - Dispose
Ctx - Mount
Ctx - Render
Ctx - Scheduler
- Start
Ctx - StopCtx
- Tasks
- Update
Ctx - Widget
App - Application bootstrap for a single widget instance bound to one host and one renderer. The runtime is demand-driven and only redraws when widget code requests it.