# IEasing

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-base/animation/easings/trait-ieasing/

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

```rust
trait IEasing: std::any::Any
```

Defines the interface for easing classes.

The `Any` supertrait lets optional transition adapters recognize a physical easing
and retain its parameters across interruptions, while ordinary easings keep the
normalized-progress contract. Every existing `'static` easing also implements `Any`.

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

## Members

- [`ease`](#function-ease)
- [`to_shared`](#function-to_shared)
- [`derives_from_easing`](#function-derives_from_easing)

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

### ease

```rust
fn ease(self: &Self, progress: f64) -> f64
```

Returns the transformed value for a linear progress.

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

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

### to_shared

```rust
fn to_shared(self: &Self) -> std::sync::Arc<SharedEasing>
```

The easing as the render thread evaluates it: a key frame animation of
the compositor runs there. An easing without parameters returns
itself; one with parameters returns a copy with the parameters it has
now.

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

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

### derives_from_easing

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

Whether the object is an easing class: upstream, a class deriving from
the `Easing` base class, which code tests for with a cast. True for
every easing of this module and by default, because implementing this
trait is how an easing class is written here; an object that stands
for a bare implementation of the contract (not an easing class)
answers false.

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

## Trait implementations

- [`IEasing`](/docs/0.5.0/api/ferroui-base/animation/easings/trait-ieasing/)

## Availability

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