# Phaser

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

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

```rust
struct Phaser
```

Coordinates phase work for one repeater. Callbacks capture the owner weakly;
recycling cancels outstanding work before an element can be reused.

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

## Members

- [`new`](#function-new)
- [`get_data_template_component`](#function-get_data_template_component)
- [`set_data_template_component`](#function-set_data_template_component)
- [`initialize_phase_zero`](#function-initialize_phase_zero)
- [`phase_element`](#function-phase_element)
- [`stop_phasing`](#function-stop_phasing)
- [`pending_count`](#function-pending_count)
- [`validate_phase_ordering`](#function-validate_phase_ordering)

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

### new

```rust
fn new(visible_window: Rc<dyn Fn() -> Rect>, item_at: Rc<dyn Fn(i32) -> Option<BoxedValue>>) -> Rc<Self>
```



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

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

### get_data_template_component

```rust
fn get_data_template_component(element: &Control) -> Option<Rc<dyn IDataTemplateComponent>>
```



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

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

### set_data_template_component

```rust
fn set_data_template_component(element: &Control, component: Option<Rc<dyn IDataTemplateComponent>>)
```



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

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

### initialize_phase_zero

```rust
fn initialize_phase_zero(element: &Ref<Control>, info: &Rc<VirtualizationInfo>, data: Option<BoxedValue>, index: i32)
```

Runs phase zero before the host assigns DataContext. Deferred work is
registered separately, after ElementPrepared has notified application
code and the new root is in the visual tree.

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

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

### phase_element

```rust
fn phase_element(self: &Rc<Self>, element: &Ref<Control>, info: &Rc<VirtualizationInfo>)
```



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

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

### stop_phasing

```rust
fn stop_phasing(self: &Self, element: &Ref<Control>, info: &Rc<VirtualizationInfo>)
```



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

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

### pending_count

```rust
fn pending_count(self: &Self) -> usize
```



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

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

### validate_phase_ordering

```rust
fn validate_phase_ordering(current: i32, next: i32)
```



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

## 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`
- `Drop`

## Availability

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