# StateBehavior

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-livecharts/visual_states/struct-statebehavior/

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

```rust
struct StateBehavior
```

Inline state behavior. Omitted actions are no-ops.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.LiveCharts/visual_states/state_behavior.rs#L15)

## Members

- [`on_applied`](#struct_field-on_applied)
- [`on_removed`](#struct_field-on_removed)
- [`new`](#function-new)
- [`applied`](#function-applied)
- [`removed`](#function-removed)

<a id="struct_field-on_applied"></a>

### on_applied

```rust
on_applied: Option<StateCallback>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.LiveCharts/visual_states/state_behavior.rs#L16)

<a id="struct_field-on_removed"></a>

### on_removed

```rust
on_removed: Option<StateCallback>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.LiveCharts/visual_states/state_behavior.rs#L17)

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

### new

```rust
fn new(on_applied: Option<StateCallback>, on_removed: Option<StateCallback>) -> Self
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.LiveCharts/visual_states/state_behavior.rs#L20)

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

### applied

```rust
fn applied(self: Self, callback: impl Fn(&mut Animatable, f64) -> () + 'static) -> Self
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.LiveCharts/visual_states/state_behavior.rs#L26)

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

### removed

```rust
fn removed(self: Self, callback: impl Fn(&mut Animatable, f64) -> () + 'static) -> Self
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.LiveCharts/visual_states/state_behavior.rs#L30)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `CloneToUninit`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- `ToOwned`
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `ErasedDestructor`
- `IntoEither`
- `Clone`
- `Default`
- `Debug`
- [`IStateBehavior`](/docs/0.5.0/api/ferroui-livecharts/visual_states/trait-istatebehavior/)

## Availability

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