# ComponentReloadTarget

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-hot-reload/struct-componentreloadtarget/

**struct** · [`ferroui-hot-reload`](/docs/0.5.0/api/ferroui-hot-reload/) · v0.5.0

```rust
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.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.HotReload/component.rs#L77)

## Members

- [`with_dependencies`](#function-with_dependencies)
- [`content_control`](#function-content_control)
- [`content_page`](#function-content_page)
- [`with_refresh`](#function-with_refresh)
- [`with_owned_resources`](#function-with_owned_resources)
- [`with_owned_styles`](#function-with_owned_styles)
- [`with_owned_handlers`](#function-with_owned_handlers)
- [`with_state_adapter`](#function-with_state_adapter)
- [`with_owned_root_property`](#function-with_owned_root_property)
- [`with_owned_root_static_resource_property`](#function-with_owned_root_static_resource_property)
- [`is_alive`](#function-is_alive)
- [`with_owned_root_binding_property`](#function-with_owned_root_binding_property)

<a id="function-with_dependencies"></a>

### with_dependencies

```rust
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.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.HotReload/component.rs#L95)

<a id="function-content_control"></a>

### content_control

```rust
fn content_control(root: &Ref<ContentControl>, uri: String, baseline: String, configuration: RuntimeXamlLoaderConfiguration) -> Self
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.HotReload/component.rs#L103)

<a id="function-content_page"></a>

### content_page

```rust
fn content_page(root: &Ref<ContentPage>, uri: String, baseline: String, configuration: RuntimeXamlLoaderConfiguration) -> Self
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.HotReload/component.rs#L124)

<a id="function-with_refresh"></a>

### with_refresh

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



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.HotReload/component.rs#L145)

<a id="function-with_owned_resources"></a>

### with_owned_resources

```rust
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.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.HotReload/component.rs#L152)

<a id="function-with_owned_styles"></a>

### with_owned_styles

```rust
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.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.HotReload/component.rs#L158)

<a id="function-with_owned_handlers"></a>

### with_owned_handlers

```rust
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.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.HotReload/component.rs#L164)

<a id="function-with_state_adapter"></a>

### with_state_adapter

```rust
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.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.HotReload/component.rs#L170)

<a id="function-with_owned_root_property"></a>

### with_owned_root_property

```rust
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.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.HotReload/component.rs#L178)

<a id="function-with_owned_root_static_resource_property"></a>

### with_owned_root_static_resource_property

```rust
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.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.HotReload/component.rs#L199)

<a id="function-is_alive"></a>

### is_alive

```rust
fn is_alive(self: &Self) -> bool
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.HotReload/component.rs#L214)

<a id="function-with_owned_root_binding_property"></a>

### with_owned_root_binding_property

```rust
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.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.HotReload/component.rs#L223)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `ErasedDestructor`
- `IntoEither`
- [`ReloadTarget`](/docs/0.5.0/api/ferroui-hot-reload/trait-reloadtarget/)

## Availability

Extracted for `aarch64-apple-darwin`. Cargo features are listed in the [crate index](/docs/0.5.0/api/).
