# DirectConnectedAnimationConfiguration

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-controls/animation/struct-directconnectedanimationconfiguration/

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

```rust
struct DirectConnectedAnimationConfiguration
```

Produces a direct, linear translation suitable for back navigation. No
gravity arc or shadow is applied, and the default duration is shorter
(150 ms).

Assign this to the configuration of a
`ConnectedAnimation` before starting the
return animation to animate back to the source view.

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

## Members

- [`new`](#function-new)
- [`duration`](#function-duration)
- [`set_duration`](#function-set_duration)
- [`with_duration`](#function-with_duration)

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

### new

```rust
fn new() -> Rc<Self>
```

Creates the configuration.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/animation/connected_animation_configuration.rs#L76)

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

### duration

```rust
fn duration(self: &Self) -> Option<Duration>
```

Gets the duration of the animation. When `None`, the default duration
of the `ConnectedAnimationService`
is used.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/animation/connected_animation_configuration.rs#L83)

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

### set_duration

```rust
fn set_duration(self: &Self, value: Option<Duration>)
```

Sets the duration of the animation.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/animation/connected_animation_configuration.rs#L88)

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

### with_duration

```rust
fn with_duration(self: Rc<Self>, value: Option<Duration>) -> Rc<Self>
```

Sets `duration` and returns the configuration.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/animation/connected_animation_configuration.rs#L93)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `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`
- [`ConnectedAnimationConfiguration`](/docs/0.5.0/api/ferroui-controls/animation/trait-connectedanimationconfiguration/)

## Availability

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