# Animation

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-livecharts/motion/struct-animation/

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

```rust
struct Animation
```



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

## Members

- [`duration`](#struct_field-duration)
- [`easing_function`](#struct_field-easing_function)
- [`repeat_times`](#struct_field-repeat_times)
- [`new`](#function-new)
- [`with_repeat`](#function-with_repeat)

<a id="struct_field-duration"></a>

### duration

```rust
duration: f64
```

Milliseconds, on the caller's monotonic clock.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.LiveCharts/motion/animation.rs#L16)

<a id="struct_field-easing_function"></a>

### easing_function

```rust
easing_function: Option<crate::easing_functions::EasingFunction>
```

`None` disables interpolation and snaps to the target.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.LiveCharts/motion/animation.rs#L18)

<a id="struct_field-repeat_times"></a>

### repeat_times

```rust
repeat_times: Repeat
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.LiveCharts/motion/animation.rs#L19)

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

### new

```rust
fn new(duration: f64, easing: impl Fn(f64) -> f64 + 'static) -> Self
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.LiveCharts/motion/animation.rs#L33)

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

### with_repeat

```rust
fn with_repeat(self: Self, repeat: Repeat) -> Self
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.LiveCharts/motion/animation.rs#L40)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `CloneToUninit`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- `ToOwned`
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `ErasedDestructor`
- `IntoEither`
- `Clone`
- `Default`
- `Debug`

## Availability

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