# Cue

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

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

```rust
struct Cue
```

Determines the time index for a key frame: a fraction of the animation's
duration in `[0, 1]`.

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

## Members

- [`new`](#function-new)
- [`try_new`](#function-try_new)
- [`cue_value`](#function-cue_value)
- [`parse`](#function-parse)
- [`equals_f64`](#function-equals_f64)

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

### new

```rust
fn new(value: f64) -> Self
```

Creates a cue. Panics when the value is outside `[0, 1]`.

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

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

### try_new

```rust
fn try_new(value: f64) -> Option<Self>
```

Creates a cue; `None` when the value is outside `[0, 1]`.

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

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

### cue_value

```rust
fn cue_value(self: &Self) -> f64
```

The normalized percent value of the cue.

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

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

### parse

```rust
fn parse(value: &str) -> Result<Cue, FormatError>
```

Parses a cue from a percentage, with or without a trailing `%`.

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

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

### equals_f64

```rust
fn equals_f64(self: &Self, other: f64) -> bool
```

Checks for value equality with a number.

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

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- [`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`
- `ErasedDestructor`
- `IntoEither`
- `Clone`
- `Copy`
- `Debug`
- `Default`
- `StructuralPartialEq`
- `PartialEq`
- `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/).
