# StepEasingFunction

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

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

```rust
struct StepEasingFunction
```

A function that advances in steps (WinUI `StepEasingFunction`). The
output is `step / step_count` for a step between
`initial_step` and `final_step`.

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

## Members

- [`new`](#function-new)
- [`with_step_count`](#function-with_step_count)
- [`step_count`](#function-step_count)
- [`set_step_count`](#function-set_step_count)
- [`initial_step`](#function-initial_step)
- [`set_initial_step`](#function-set_initial_step)
- [`final_step`](#function-final_step)
- [`set_final_step`](#function-set_final_step)
- [`is_initial_step_single_frame`](#function-is_initial_step_single_frame)
- [`set_is_initial_step_single_frame`](#function-set_is_initial_step_single_frame)
- [`is_final_step_single_frame`](#function-is_final_step_single_frame)
- [`set_is_final_step_single_frame`](#function-set_is_final_step_single_frame)

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

### new

```rust
fn new() -> StepEasingFunction
```

A function with one step.

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

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

### with_step_count

```rust
fn with_step_count(step_count: i32) -> StepEasingFunction
```

A function with `step_count` steps.

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

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

### step_count

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

The number of steps between the starting value and the end value.

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

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

### set_step_count

```rust
fn set_step_count(self: &Self, value: i32)
```



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

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

### initial_step

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

The step to start at (0 by default).

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

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

### set_initial_step

```rust
fn set_initial_step(self: &Self, value: i32)
```



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

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

### final_step

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

The step to end at: the step count until it is set.

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

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

### set_final_step

```rust
fn set_final_step(self: &Self, value: i32)
```



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

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

### is_initial_step_single_frame

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

Whether the initial step lasts the smallest possible duration.

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

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

### set_is_initial_step_single_frame

```rust
fn set_is_initial_step_single_frame(self: &Self, value: bool)
```



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

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

### is_final_step_single_frame

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

Whether the final step lasts the smallest possible duration.

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

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

### set_is_final_step_single_frame

```rust
fn set_is_final_step_single_frame(self: &Self, value: bool)
```



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

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `Borrow<T>`
- `BorrowMut<T>`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- `ErasedDestructor`
- `IntoEither`
- `Default`
- [`IEasing`](/docs/0.5.0/api/ferroui-base/animation/easings/trait-ieasing/)
- `From<StepEasingFunction>`

## Availability

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