pub struct PanelReloadTarget { /* private fields */ }Expand description
Opt-in adapter for framework panels. Only owned children 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.
Implementations§
Source§impl PanelReloadTarget
impl PanelReloadTarget
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 new( root: &Ref<Panel>, owned: Range<usize>, uri: String, baseline: String, configuration: RuntimeXamlLoaderConfiguration, ) -> Result<Self, ReloadError>
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 existing XAML Resources contributions; see ComponentReloadTarget.
Sourcepub fn with_owned_styles(self) -> Self
pub fn with_owned_styles(self) -> Self
Claims inline styles and Styles.Resources after initial XAML population.
Sourcepub fn with_owned_handlers(self) -> Result<Self, ReloadError>
pub fn with_owned_handlers(self) -> Result<Self, ReloadError>
Claims the document’s routed XAML handlers. Call after population and before adding application children; the owned range must cover the document.
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 uniquely identified controls in the panel’s namescope. Application children must use separate scopes.
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 an initially populated literal root attribute for reversible reload. See ComponentReloadTarget::with_owned_root_property for the ownership contract.
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 literal or synchronous root binding with the same ownership and context contract as ComponentReloadTarget::with_owned_root_binding_property.
Trait Implementations§
Source§impl ReloadTarget for PanelReloadTarget
impl ReloadTarget for PanelReloadTarget
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 PanelReloadTarget
impl !Send for PanelReloadTarget
impl !Sync for PanelReloadTarget
impl !UnwindSafe for PanelReloadTarget
impl Freeze for PanelReloadTarget
impl Unpin for PanelReloadTarget
impl UnsafeUnpin for PanelReloadTarget
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