# RecyclingElementFactory

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-controls-repeater/struct-recyclingelementfactory/

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

```rust
struct RecyclingElementFactory
```

A factory that selects named templates and shares elements through a pool.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.Repeater/recycling_element_factory.rs#L60)

## Members

- [`TYPE`](#assoc_const-type)
- [`to_ref`](#function-to_ref)
- [`on_select_template_key_core`](#function-on_select_template_key_core)
- [`recycle_pool_property`](#function-recycle_pool_property)
- [`templates_property`](#function-templates_property)
- [`construct`](#function-construct)
- [`new`](#function-new)
- [`recycle_pool`](#function-recycle_pool)
- [`set_recycle_pool`](#function-set_recycle_pool)
- [`templates`](#function-templates)
- [`set_templates`](#function-set_templates)
- [`select_template_key`](#function-select_template_key)

<a id="assoc_const-type"></a>

### TYPE

```rust
const TYPE: &'static $crate::TypeInfo
```

The runtime type of this class.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.Repeater/recycling_element_factory.rs#L64)

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

### to_ref

```rust
fn to_ref(self: &Self) -> $crate::Ref<RecyclingElementFactory>
```

Returns a strong reference to this object.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.Repeater/recycling_element_factory.rs#L64)

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

### on_select_template_key_core

```rust
fn on_select_template_key_core(self: &Self, data_context: Option<BoxedValue>, owner: Option<Ref<Control>>) -> Result<String, ElementFactoryError>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.Repeater/recycling_element_factory.rs#L64)

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

### recycle_pool_property

```rust
fn recycle_pool_property() -> &'static StyledProperty<Option<Ref<RecyclePool>>>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.Repeater/recycling_element_factory.rs#L95)

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

### templates_property

```rust
fn templates_property() -> &'static StyledProperty<Option<ElementFactoryTemplates>>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.Repeater/recycling_element_factory.rs#L95)

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

### construct

```rust
fn construct() -> Self
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.Repeater/recycling_element_factory.rs#L107)

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

### new

```rust
fn new() -> Ref<Self>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.Repeater/recycling_element_factory.rs#L113)

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

### recycle_pool

```rust
fn recycle_pool(self: &Self) -> Option<Ref<RecyclePool>>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.Repeater/recycling_element_factory.rs#L116)

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

### set_recycle_pool

```rust
fn set_recycle_pool(self: &Self, pool: Option<Ref<RecyclePool>>)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.Repeater/recycling_element_factory.rs#L119)

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

### templates

```rust
fn templates(self: &Self) -> ElementFactoryTemplates
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.Repeater/recycling_element_factory.rs#L122)

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

### set_templates

```rust
fn set_templates(self: &Self, templates: Option<ElementFactoryTemplates>)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.Repeater/recycling_element_factory.rs#L126)

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

### select_template_key

```rust
fn select_template_key(self: &Self, handler: impl Fn(&SelectTemplateEventArgs) -> () + 'static) -> Rc<dyn IDisposable>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls.Repeater/recycling_element_factory.rs#L129)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- [`ElementFactoryImplExt`](/docs/0.5.0/api/ferroui-controls-repeater/trait-elementfactoryimplext/)
- [`RecyclingElementFactoryImplExt`](/docs/0.5.0/api/ferroui-controls-repeater/trait-recyclingelementfactoryimplext/)
- `Borrow<T>`
- `BorrowMut<T>`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- [`Receiver`](/docs/0.5.0/api/ferroui-system/task/oneshot/struct-receiver/)
- `Any`
- [`FerroObjectImplExt`](/docs/0.5.0/api/ferroui-base/trait-ferroobjectimplext/)
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `ErasedDestructor`
- `IntoEither`
- `Deref`
- [`Upcast<T>`](/docs/0.5.0/api/ferroui-base/trait-upcast/)
- [`Upcast<RecyclingElementFactory>`](/docs/0.5.0/api/ferroui-base/trait-upcast/)
- [`StaticType`](/docs/0.5.0/api/ferroui-base/trait-statictype/)
- [`ObjectType`](/docs/0.5.0/api/ferroui-base/trait-objecttype/)
- [`Subclassable<T>`](/docs/0.5.0/api/ferroui-base/trait-subclassable/)
- [`DefaultConstructible`](/docs/0.5.0/api/ferroui-base/trait-defaultconstructible/)
- [`FerroObjectImpl`](/docs/0.5.0/api/ferroui-base/trait-ferroobjectimpl/)
- [`RecyclingElementFactoryImpl`](/docs/0.5.0/api/ferroui-controls-repeater/trait-recyclingelementfactoryimpl/)
- [`ElementFactoryImpl`](/docs/0.5.0/api/ferroui-controls-repeater/trait-elementfactoryimpl/)

## Availability

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