# IterationCount

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-base/animation/struct-iterationcount/

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

```rust
struct IterationCount
```

Determines the number of iterations of an animation. Also defines its
repeat type.

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

## Members

- [`INFINITE`](#assoc_const-infinite)
- [`new`](#function-new)
- [`with_type`](#function-with_type)
- [`repeat_type`](#function-repeat_type)
- [`is_infinite`](#function-is_infinite)
- [`value`](#function-value)
- [`parse`](#function-parse)

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

### INFINITE

```rust
const INFINITE: IterationCount
```

An instance that makes the animation loop forever.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/animation/iteration_count.rs#L25)

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

### new

```rust
const fn new(value: u64) -> Self
```

Creates a count of `value` iterations.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/animation/iteration_count.rs#L28)

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

### with_type

```rust
const fn with_type(value: u64, type_: IterationType) -> Self
```

Creates a count with an explicit repeat type.

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

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

### repeat_type

```rust
const fn repeat_type(self: &Self) -> IterationType
```

The repeat type.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/animation/iteration_count.rs#L38)

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

### is_infinite

```rust
const fn is_infinite(self: &Self) -> bool
```

Whether the animation loops forever.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/animation/iteration_count.rs#L43)

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

### value

```rust
const fn value(self: &Self) -> u64
```

The number of iterations.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/animation/iteration_count.rs#L48)

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

### parse

```rust
fn parse(s: &str) -> Result<IterationCount, FormatError>
```

Parses `"Infinite"` (case-insensitive) or a non-negative integer.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/animation/iteration_count.rs#L53)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- [`ResourceKeyObject`](/docs/0.5.0/api/ferroui-base/controls/trait-resourcekeyobject/)
- [`PropertyValue`](/docs/0.5.0/api/ferroui-base/trait-propertyvalue/)
- [`AnyValue`](/docs/0.5.0/api/ferroui-base/trait-anyvalue/)
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `Borrow<T>`
- `BorrowMut<T>`
- `CloneToUninit`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- `ToOwned`
- `ToString`
- `ErasedDestructor`
- `IntoEither`
- `Clone`
- `Copy`
- `Debug`
- `Default`
- `PartialEq`
- `Eq`
- `Hash`
- `Display`
- `FromStr`
- [`MarkupTyped`](/docs/0.5.0/api/ferroui-base/metadata/trait-markuptyped/)
- [`ValueTypeRegistration`](/docs/0.5.0/api/ferroui-base/data/core/trait-valuetyperegistration/)

## Availability

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