Skip to main content

PanelReloadTarget

Struct PanelReloadTarget 

Source
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

Source

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.

Source

pub fn new( root: &Ref<Panel>, owned: Range<usize>, uri: String, baseline: String, configuration: RuntimeXamlLoaderConfiguration, ) -> Result<Self, ReloadError>

Source

pub fn with_refresh(self, refresh: Rc<dyn ComponentRefresh>) -> Self

Source

pub fn with_owned_resources(self) -> Self

Claims existing XAML Resources contributions; see ComponentReloadTarget.

Source

pub fn with_owned_styles(self) -> Self

Claims inline styles and Styles.Resources after initial XAML population.

Source

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.

Source

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.

Source

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.

Source

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.

Source

pub fn is_alive(&self) -> bool

Source

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

Source§

fn complete_pending_state(&self)

Complete state restoration from an earlier accepted revision at the UI boundary. Runs against accepted sources, before candidate resource previews or preparation. Custom adapters normally need only the default no-op.
Source§

fn documents(&self) -> Vec<String>

Includes transitive document dependencies. A target may refresh this list after each revision.
Source§

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>

Resource owners provide a lazy preview before ordinary view preparation.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> ClassDefaults for T
where T: ?Sized,

Source§

fn static_constructor()

The static constructor of a type: work done once per thread, after the properties of the type are registered and before its first instance exists (class handlers, affects_render, metadata overrides). Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.