ComponentReloadTarget
struct · ferroui-hot-reload · v0.5.0
struct ComponentReloadTarget
Explicitly opt in for declarative content. Use with_refresh for 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_resources and with_owned_styles claim inline
Resources and Styles. with_owned_handlers claims routed XAML subscriptions.
Members
with_dependenciescontent_controlcontent_pagewith_refreshwith_owned_resourceswith_owned_styleswith_owned_handlerswith_state_adapterwith_owned_root_propertywith_owned_root_static_resource_propertyis_alivewith_owned_root_binding_property
with_dependencies
fn with_dependencies(self: Self, dependencies: impl IntoIterator<Item = String>) -> Self
Declares resources/styles outside the document's inline includes, such as application resources consumed through StaticResource. Their revisions are prepared and committed in the same transaction as this target.
content_control
fn content_control(root: &Ref<ContentControl>, uri: String, baseline: String, configuration: RuntimeXamlLoaderConfiguration) -> Self
content_page
fn content_page(root: &Ref<ContentPage>, uri: String, baseline: String, configuration: RuntimeXamlLoaderConfiguration) -> Self
with_refresh
fn with_refresh(self: Self, refresh: Rc<dyn ComponentRefresh>) -> Self
with_owned_resources
fn with_owned_resources(self: Self) -> Self
Claims the current root Resources contributions immediately after population.
Preserves later application keys; conflicting writes/provider ownership require restart.
Use with_owned_styles for Styles; custom resource side effects need an adapter.
with_owned_styles
fn with_owned_styles(self: Self) -> Self
Claims the current inline styles and Styles.Resources after initial population. Later application style entries retain their identity/order.
with_owned_handlers
fn with_owned_handlers(self: Self) -> Self
Claims routed XAML subscriptions from initial population. Framework metadata events without a removable token require an explicit adapter.
with_state_adapter
fn with_state_adapter(self: Self, adapter: Rc<dyn crate::ControlStateAdapter>) -> Self
Add application state transfer for named/keyed replacement children. The preserved component root is not reconstructed or restored by this hook.
with_owned_root_property
fn with_owned_root_property<T: ferroui_base::PropertyValue>(self: Self, property: &'static ferroui_base::StyledProperty<T>) -> Self
Claims XAML ownership of this literal root attribute. Call immediately after initial population, before application overrides. Binding/animation changes and externally changed values require restart. Custom property callbacks must support reversible assignment; no arbitrary user side effects are rolled back.
with_owned_root_static_resource_property
fn with_owned_root_static_resource_property<T: ferroui_base::PropertyValue>(self: Self, property: &'static ferroui_base::StyledProperty<T>) -> Self
Claims a root literal or StaticResource assignment, including Theme/Template. Re-resolves the candidate value on dependency revisions even when the markup attribute is unchanged. Call immediately after initial population. Dynamic resources, bindings and application overrides require another adapter or restart. Property callbacks must support reversible assignment.
is_alive
fn is_alive(self: &Self) -> bool
with_owned_root_binding_property
fn with_owned_root_binding_property<T: ferroui_base::PropertyValue>(self: Self, property: &'static ferroui_base::StyledProperty<T>) -> Self
Claims a root literal or synchronous reflection/compiled binding. Register immediately after population, before application assignments. Preparation defers the candidate root binding and recreates it for the preserved root; its new namescope belongs to the candidate children. Custom binding kinds, delayed/asynchronous update modes and lifecycle properties need an adapter.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>AnyClassDefaultsErasedDestructorIntoEitherReloadTarget
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.