pub struct ComponentReloadTarget { /* private fields */ }Expand description
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.
Implementations§
Source§impl ComponentReloadTarget
impl ComponentReloadTarget
Sourcepub fn with_dependencies(
self,
dependencies: impl IntoIterator<Item = String>,
) -> Self
pub fn with_dependencies( 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.
pub fn content_control( root: &Ref<ContentControl>, uri: String, baseline: String, configuration: RuntimeXamlLoaderConfiguration, ) -> Self
pub fn content_page( root: &Ref<ContentPage>, uri: String, baseline: String, configuration: RuntimeXamlLoaderConfiguration, ) -> Self
pub fn with_refresh(self, refresh: Rc<dyn ComponentRefresh>) -> Self
Sourcepub fn with_owned_resources(self) -> Self
pub fn with_owned_resources(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.
Sourcepub fn with_owned_styles(self) -> Self
pub fn with_owned_styles(self) -> Self
Claims the current inline styles and Styles.Resources after initial population. Later application style entries retain their identity/order.
Sourcepub fn with_owned_handlers(self) -> Self
pub fn with_owned_handlers(self) -> Self
Claims routed XAML subscriptions from initial population. Framework metadata events without a removable token require an explicit adapter.
Sourcepub fn with_state_adapter(self, adapter: Rc<dyn ControlStateAdapter>) -> Self
pub fn with_state_adapter(self, adapter: Rc<dyn ControlStateAdapter>) -> Self
Add application state transfer for named/keyed replacement children. The preserved component root is not reconstructed or restored by this hook.
Sourcepub fn with_owned_root_property<T: PropertyValue>(
self,
property: &'static StyledProperty<T>,
) -> Self
pub fn with_owned_root_property<T: PropertyValue>( self, property: &'static 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.
Sourcepub fn with_owned_root_static_resource_property<T: PropertyValue>(
self,
property: &'static StyledProperty<T>,
) -> Self
pub fn with_owned_root_static_resource_property<T: PropertyValue>( self, property: &'static 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.
pub fn is_alive(&self) -> bool
Sourcepub fn with_owned_root_binding_property<T: PropertyValue>(
self,
property: &'static StyledProperty<T>,
) -> Self
pub fn with_owned_root_binding_property<T: PropertyValue>( self, property: &'static 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§
Source§impl ReloadTarget for ComponentReloadTarget
impl ReloadTarget for ComponentReloadTarget
Source§fn complete_pending_state(&self)
fn complete_pending_state(&self)
Source§fn documents(&self) -> Vec<String>
fn documents(&self) -> Vec<String>
fn prepare( &self, sources: Rc<Sources>, ) -> Result<Box<dyn PreparedReload>, ReloadError>
Source§fn resource_preparation(
self: Rc<Self>,
_sources: Rc<Sources>,
) -> Result<Option<ResourcePreparation>, ReloadError>
fn resource_preparation( self: Rc<Self>, _sources: Rc<Sources>, ) -> Result<Option<ResourcePreparation>, ReloadError>
Auto Trait Implementations§
impl !RefUnwindSafe for ComponentReloadTarget
impl !Send for ComponentReloadTarget
impl !Sync for ComponentReloadTarget
impl !UnwindSafe for ComponentReloadTarget
impl Freeze for ComponentReloadTarget
impl Unpin for ComponentReloadTarget
impl UnsafeUnpin for ComponentReloadTarget
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
affects_render, metadata
overrides). Read more