hot
module · ferroui-view · v0.5.0
module hot
Hot reload of the literals of rsx! (feature hot-reload).
rsx! passes each literal it can change at run time (the text of a child,
a number, a text or a character given to an attribute) through lit,
with the place of the macro and the number of the literal among the
literal tokens of the macro. Without the feature lit returns the literal
and costs nothing.
With the feature, watch (which launch calls) checks the source files
that hold rsx! literals several times a second. When a file changes, its
macros are read again (proc-macro2 with the locations of tokens): a
macro whose tokens are those of the build apart from literals gets the new
literals, and the components that read them run again, so the
reconciler patches the controls and keeps their state. A macro whose
structure changed is reported (Diagnostic::NeedsRebuild): it needs a
rebuild. Only components that run again (rerender,
#[component(rerender)]) and children that follow state run again; a
component that runs once keeps what it built.
Contents
Site— structHotLiteral— traitlit— functionwatch— functionpoll— functionapply_source— function
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.