# IRecyclingDataTemplate

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-controls/templates/trait-irecyclingdatatemplate/

**trait** · [`ferroui-controls`](/docs/0.5.0/api/ferroui-controls/) · v0.5.0

```rust
trait IRecyclingDataTemplate: IDataTemplate
```

An [`IDataTemplate`](/docs/0.5.0/api/ferroui-controls/templates/trait-idatatemplate/) that supports recycling existing elements.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/templates/i_recycling_data_template.rs#L6)

## Members

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

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

### build_with_existing

```rust
fn build_with_existing(self: &Self, data: Option<&BoxedValue>, existing: Option<Ref<Control>>) -> Option<Ref<Control>>
```

Creates or recycles a control to display the specified data.

`existing` is an optional control that was previously created by this
template that may be recycled. The recycled control should be
returned unchanged; its data context is set by the caller.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/templates/i_recycling_data_template.rs#L12)

## Trait implementations

- [`IRecyclingDataTemplate`](/docs/0.5.0/api/ferroui-controls/templates/trait-irecyclingdatatemplate/)

## Availability

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