# Timeline

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-designer-animation/struct-timeline/

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

```rust
struct Timeline
```



[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Animation/timeline.rs#L263)

## Members

- [`duration`](#struct_field-duration)
- [`delay`](#struct_field-delay)
- [`delay_between_iterations`](#struct_field-delay_between_iterations)
- [`playback_behavior`](#struct_field-playback_behavior)
- [`speed_ratio`](#struct_field-speed_ratio)
- [`repeat`](#struct_field-repeat)
- [`playback_direction`](#struct_field-playback_direction)
- [`fill`](#struct_field-fill)
- [`easing`](#struct_field-easing)
- [`tracks`](#struct_field-tracks)
- [`new`](#function-new)
- [`validate`](#function-validate)
- [`record`](#function-record)
- [`track`](#function-track)
- [`track_mut`](#function-track_mut)
- [`remove_track`](#function-remove_track)
- [`compile`](#function-compile)
- [`sample`](#function-sample)
- [`scrub`](#function-scrub)
- [`pauses_when_hidden`](#function-pauses_when_hidden)
- [`total_duration`](#function-total_duration)
- [`to_xaml`](#function-to_xaml)
- [`to_style_xaml`](#function-to_style_xaml)
- [`from_xaml`](#function-from_xaml)
- [`import_xaml`](#function-import_xaml)

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

### duration

```rust
duration: f64
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Animation/timeline.rs#L264)

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

### delay

```rust
delay: f64
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Animation/timeline.rs#L265)

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

### delay_between_iterations

```rust
delay_between_iterations: f64
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Animation/timeline.rs#L267)

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

### playback_behavior

```rust
playback_behavior: PlaybackBehavior
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Animation/timeline.rs#L269)

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

### speed_ratio

```rust
speed_ratio: f64
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Animation/timeline.rs#L270)

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

### repeat

```rust
repeat: Repeat
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Animation/timeline.rs#L271)

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

### playback_direction

```rust
playback_direction: PlaybackDirection
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Animation/timeline.rs#L272)

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

### fill

```rust
fill: FillMode
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Animation/timeline.rs#L273)

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

### easing

```rust
easing: crate::Easing
```

Global progress easing, applied before selecting an incoming keyframe segment.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Animation/timeline.rs#L275)

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

### tracks

```rust
tracks: Vec<Track>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Animation/timeline.rs#L276)

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

### new

```rust
fn new(duration: f64) -> Result<Self>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Animation/timeline.rs#L285)

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

### validate

```rust
fn validate(self: &Self) -> Result<()>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Animation/timeline.rs#L301)

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

### record

```rust
fn record(self: &mut Self, target: u64, property: impl Into<String>, time: f64, value: AnimationValue) -> Result<()>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Animation/timeline.rs#L350)

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

### track

```rust
fn track(self: &Self, target: u64, property: &str) -> Option<&Track>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Animation/timeline.rs#L376)

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

### track_mut

```rust
fn track_mut(self: &mut Self, target: u64, property: &str) -> Option<&mut Track>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Animation/timeline.rs#L381)

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

### remove_track

```rust
fn remove_track(self: &mut Self, target: u64, property: &str) -> bool
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Animation/timeline.rs#L386)

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

### compile

```rust
fn compile(self: &Self) -> Result<CompiledTimeline>
```

Compiles once after authoring, then samples in O(tracks * log(keyframes)) per frame.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Animation/timeline.rs#L393)

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

### sample

```rust
fn sample(self: &Self, time: f64) -> Result<Vec<Sample>>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Animation/timeline.rs#L397)

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

### scrub

```rust
fn scrub(self: &Self, time: f64) -> Result<Vec<Sample>>
```

Samples a single iteration directly for timeline scrubbing, ignoring delay/repeat/direction.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Animation/timeline.rs#L402)

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

### pauses_when_hidden

```rust
fn pauses_when_hidden(self: &Self, manually_started: bool) -> bool
```

Whether the running clock pauses for an effectively invisible target.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Animation/timeline.rs#L408)

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

### total_duration

```rust
fn total_duration(self: &Self) -> Option<f64>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Animation/timeline.rs#L421)

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

### to_xaml

```rust
fn to_xaml(self: &Self, target: u64) -> Result<String>
```

Export one target as native FerroUI Animation markup. Authored tracks without an
underlying value receive explicit hold endpoints. Imported tracks with a captured
underlying value keep native implicit endpoints: the host must retain that base property
on the target. Materializing those endpoints would alter reverse initial-delay fill.
XML is encoded once, preserving markup-extension text as an attribute value.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Animation/xaml.rs#L44)

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

### to_style_xaml

```rust
fn to_style_xaml(self: &Self, target: u64, selector: &str) -> Result<String>
```

Place this inside the owning control's .Styles property with an explicit named selector.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Animation/xaml.rs#L146)

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

### from_xaml

```rust
fn from_xaml(source: &str, target: u64) -> Result<Self>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Animation/xaml.rs#L161)

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

### import_xaml

```rust
fn import_xaml(source: &str, target: u64, options: &ImportOptions) -> Result<AnimationImport>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer.Animation/xaml.rs#L164)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `CloneToUninit`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- `ToOwned`
- `DeserializeOwned`
- `Clone`
- `Debug`
- `StructuralPartialEq`
- `PartialEq`
- `Serialize`
- `Deserialize<'de>`

## Availability

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