# ResourcePreparation

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

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

```rust
struct ResourcePreparation
```

Lazily prepares one resource contribution, shared by all candidate consumers.
Register all contributions before resolving any so dependencies are independent
of target registration order. Cycles and ambiguous ownership fail preparation.

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

## Members

- [`new`](#function-new)

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

### new

```rust
fn new(original: Rc<dyn IResourceNode>, create: impl Fn() -> Result<(std::rc::Rc<dyn IResourceNode>, Box<dyn PreparedReload>), ReloadError> + 'static) -> Self
```



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

## Trait implementations

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

## Availability

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