# IElementFactory

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-controls-repeater/trait-ielementfactory/

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

```rust
trait IElementFactory
```

Supplies and recycles the elements of an [`super::ItemsRepeater`](/docs/0.5.0/api/ferroui-controls-repeater/struct-itemsrepeater/).

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

## Members

- [`get_element`](#function-get_element)
- [`recycle_element`](#function-recycle_element)
- [`as_object`](#function-as_object)
- [`is_template_empty`](#function-is_template_empty)

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

### get_element

```rust
fn get_element(self: &Self, args: &ElementFactoryGetArgs) -> Result<Ref<Control>, ElementFactoryError>
```



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

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

### recycle_element

```rust
fn recycle_element(self: &Self, args: &ElementFactoryRecycleArgs) -> Result<(), ElementFactoryError>
```



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

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

### as_object

```rust
fn as_object(self: &Self) -> Option<Ref<FerroObject>>
```



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

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

### is_template_empty

```rust
fn is_template_empty(self: &Self, _data: Option<&BoxedValue>) -> bool
```

Direct data templates can declare that they produce no visual content.
Factories and selectors determine their content per element instead.

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

## Trait implementations

- [`IElementFactory`](/docs/0.5.0/api/ferroui-controls-repeater/trait-ielementfactory/)

## Availability

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