Expand description
Development reload transactions. All targets and commits remain on the creating UI thread.
Structs§
- Component
Reload Target - Explicitly opt in for declarative content. Use
with_refreshfor cached references and application child subscriptions. The original component is never reconstructed. Root assignments can be claimed with the literal, static-resource and binding ownership methods.with_owned_resourcesandwith_owned_stylesclaim inline Resources and Styles.with_owned_handlersclaims routed XAML subscriptions. - Content
Reload Target - Reloads a classless document inside a stable host. The host and its data context survive.
Custom
x:Classroots need an application adapter that refreshes their cached references. - Control
State Restore Context - Common admission checks for an application’s state-restoration callback.
- Document
Contract - Conservative structural contract. Expanded XML names avoid prefix-only false changes.
- File
Batch - One stable read of the entire watched set. Includes unchanged documents so a failed/missing dependency can recover without losing edits observed beside it.
- File
Change - File
Watcher - HotReload
Session - Sources become authoritative only after every affected live target commits successfully.
Session ownership is intentionally
!Send: callers must pump it on the UI thread. - Input
Pause - Disables an input root until dropped, leaving its local value and binding intact. Used during an application’s explicit restart handoff. It does not pause timers, commands invoked programmatically, background work or arbitrary model mutation; the application must quiesce those through its own restart callback/protocol. Applications must not concurrently animate IsEnabled during the handoff.
- Panel
Reload Target - Opt-in adapter for framework panels. Only
ownedchildren are replaced; application children outside that range retain their identity and ordering. The root namescope must belong to this XAML document. Application children needing names must own separate namescopes. Root assignments and routed handlers require explicit ownership opt-in; constructors are never rerun on the live root. - Reload
Manifest - Development manifest emitted by
ferroui_build::Build::hot_reload_manifest. - Reload
Outcome - Resource
Preparation - Lazily prepares one resource contribution, shared by all candidate consumers. Register all contributions before resolving any so dependencies are independent of target registration order. Cycles and ambiguous ownership fail preparation.
- Resource
Reload Target - Replaces one explicitly owned merged dictionary, preserving its container, direct application resources and all other merged dictionaries. Register static-resource consumers with this document as a dependency so the session prepares their replacements in the same revision. Dynamic-resource consumers receive the resource provider’s ordinary owner notifications.
- Restart
Handoff - Holds input and registered application participants paused until dropped.
Capture restart state only after
beginsucceeds. Keep this guard until the old process exits or handoff fails; dropping it resumes participants in reverse registration order, then releases the temporary input contribution. - Restart
Resume - Resumes one participant when dropped on the UI thread. The closure must not panic, and must restore the participant’s prior running/paused state.
- Style
Reload Target - Replaces one style or nested Styles contribution, retaining its container and application-owned siblings. Native style removal detaches the previous frames; addition invalidates styling for the owner and its logical descendants. Register static-resource consumers as dependencies of this document. Applications caching the replaced style need an explicit refresh adapter.
- Watch
Directory - A document directory and its canonical assembly URI prefix (ending in
/). - Watch
Revision
Enums§
Constants§
Traits§
- Captured
Control State - State restored only after the complete revision succeeds and layout is updated. Normally runs on the dispatcher; a subsequent reload completes pending state before preparing its candidate. Identity must be unique on both sides and the control’s runtime type must be unchanged. Failed/superseded revisions discard the snapshot without invoking this callback.
- Component
Refresh - Prepares application reference/subscription changes without mutating the live component. Commit runs after content and namescope replacement. Rollback runs after restoring the previous graph; finish runs only after every target commits. Retain old subscriptions until finish, dispose new subscriptions on rollback, and never rerun constructors. As with ReloadTarget, the application must provide reversible, non-panicking cleanup.
- Control
State Adapter - Capture application-specific state from a control before replacement.
- Prepared
Reload - An adapter must keep its prior state until
finish. Rollback must also undo a partially failed commit. Preparation must not change the live tree or run irreversible user effects. - Reload
Target - Restart
Participant - Application-owned work which must stop before restart state is captured. Called on the UI thread. Return only after mutation has stopped; asynchronous draining must finish before this call or return an error for a later retry. On error or panic the participant must undo its own partial work. Previously successful participants are resumed by the handoff. This is not a mechanism for suspending arbitrary threads or rolling back arbitrary user side effects.
Functions§
- record_
frame_ timing - Records accepted-revision timing when
FERROUI_RELOAD_TIMINGS=1. Call on the UI thread immediately after applying the revision. The next composition batch includes pending layout/scene updates through MediaContext’s normal render pass; this does not force layout or block the UI thread.