# AnimationBuilder

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-view/prelude/animation/struct-animationbuilder/

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

```rust
struct AnimationBuilder
```

An animation being built: key frames of property values at cues, and
its duration, iterations, easing and fill mode.

```ignore
animation(ms(600))
    .key_frame(0.0, |frame| frame.set(Visual::opacity_property(), 0.0))
    .key_frame(1.0, |frame| frame.set(Visual::opacity_property(), 1.0))
    .fill_mode(FillMode::Forward)
```

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/animation.rs#L96)

## Members

- [`key_frame`](#function-key_frame)
- [`iterations`](#function-iterations)
- [`easing`](#function-easing)
- [`fill_mode`](#function-fill_mode)
- [`delay`](#function-delay)
- [`build`](#function-build)

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

### key_frame

```rust
fn key_frame(self: Self, cue: f64, frame: impl FnOnce(KeyFrameBuilder) -> KeyFrameBuilder) -> Self
```

Adds a key frame at `cue` (0.0 the start, 1.0 the end).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/animation.rs#L124)

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

### iterations

```rust
fn iterations(self: Self, count: IterationCount) -> Self
```

How often it runs.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/animation.rs#L133)

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

### easing

```rust
fn easing(self: Self, easing: impl Into<Easing>) -> Self
```

Its easing.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/animation.rs#L139)

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

### fill_mode

```rust
fn fill_mode(self: Self, fill_mode: FillMode) -> Self
```

Whether the values of its ends are kept before and after it runs.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/animation.rs#L145)

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

### delay

```rust
fn delay(self: Self, delay: Duration) -> Self
```

Its delay.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/animation.rs#L151)

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

### build

```rust
fn build(self: Self) -> Ref<Animation>
```

The animation.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/animation.rs#L157)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- [`IntoValue<T>`](/docs/0.5.0/api/ferroui-view/builder/trait-intovalue/)
- [`IntoProp<T, Value>`](/docs/0.5.0/api/ferroui-view/builder/trait-intoprop/)
- `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`

## Availability

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