FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    CapturedControlState

    trait · ferroui-hot-reload · v0.5.0

    trait CapturedControlState
    

    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.

    Restore must not panic. It is an application callback after commit, not a reversible transaction. Authored values, bindings and new application state take precedence over the snapshot; use the context's property guard and any additional checks required by the custom control. Do not reenter the same session from this callback; post additional reload work to the dispatcher.

    View source

    Members

    restore

    fn restore(self: &Self, control: &Ref<StyledElement>, context: &ControlStateRestoreContext<'_>)
    

    Source

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.