# ElasticEasingFunction

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-base/rendering/composition/animations/struct-elasticeasingfunction/

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

```rust
struct ElasticEasingFunction
```

An oscillating curve (WinUI `ElasticEasingFunction`): `oscillations`
oscillations whose amplitude grows exponentially with `springiness`.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/rendering/composition/animations/composition_easing_function.rs#L442)

## Members

- [`new`](#function-new)
- [`mode`](#function-mode)
- [`oscillations`](#function-oscillations)
- [`springiness`](#function-springiness)

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

### new

```rust
fn new(mode: CompositionEasingFunctionMode, oscillations: i32, springiness: f32) -> ElasticEasingFunction
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/rendering/composition/animations/composition_easing_function.rs#L449)

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

### mode

```rust
fn mode(self: &Self) -> CompositionEasingFunctionMode
```

The mode of the curve.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/rendering/composition/animations/composition_easing_function.rs#L454)

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

### oscillations

```rust
fn oscillations(self: &Self) -> i32
```

The number of oscillations.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/rendering/composition/animations/composition_easing_function.rs#L459)

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

### springiness

```rust
fn springiness(self: &Self) -> f32
```

The stiffness of the spring: a larger value damps the oscillations
faster.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/rendering/composition/animations/composition_easing_function.rs#L465)

## 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`
- `StructuralPartialEq`
- `PartialEq`
- [`IEasing`](/docs/0.5.0/api/ferroui-base/animation/easings/trait-ieasing/)
- `From<ElasticEasingFunction>`

## Availability

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