# Easing

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-designer-animation/enum-easing/

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

```rust
enum Easing
```

Cubic Bezier easings invert the X polynomial; evaluating Y at progress directly is incorrect.
Named curves are FerroUI's animation-wide easing names. Per-keyframe easing must be Linear or
CubicBezier to serialize as a native KeySpline without changing semantics.

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

## Members

- [`Linear`](#variant-linear)
- [`CubicBezier`](#variant-cubicbezier)
- [`Spring`](#variant-spring)
- [`Named`](#variant-named)
- [`validate`](#function-validate)
- [`sample`](#function-sample)
- [`parse`](#function-parse)
- [`to_xaml`](#function-to_xaml)

<a id="variant-linear"></a>

### Linear

```rust
Linear
```



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

<a id="variant-cubicbezier"></a>

### CubicBezier

```rust
CubicBezier { x1: f64, y1: f64, x2: f64, y2: f64 }
```



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

<a id="variant-spring"></a>

### Spring

```rust
Spring { mass: f64, stiffness: f64, damping: f64, initial_velocity: f64 }
```



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

<a id="variant-named"></a>

### Named

```rust
Named(String)
```



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

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

### validate

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



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

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

### sample

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



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

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

### parse

```rust
fn parse(source: &str) -> Result<Self>
```



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

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

### to_xaml

```rust
fn to_xaml(self: &Self) -> String
```



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

## 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`
- `Default`
- `StructuralPartialEq`
- `PartialEq`
- `Serialize`
- `Deserialize<'de>`

## Availability

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