# IReversibleAction

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-xaml-interactivity/trait-ireversibleaction/

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

```rust
trait IReversibleAction: IAction
```

Interface for actions that can revert the effect of a previous
`IAction::execute` call.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactivity/contract/i_reversible_action.rs#L8)

## Members

- [`execute_reversibly`](#function-execute_reversibly)
- [`revert`](#function-revert)

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

### execute_reversibly

```rust
fn execute_reversibly(self: &Self, sender: Option<&BoxedValue>, parameter: Option<&BoxedValue>) -> Option<BoxedValue>
```

Executes the action while capturing the state required by
`revert`.

Returns the result of the reversible execution.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactivity/contract/i_reversible_action.rs#L13)

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

### revert

```rust
fn revert(self: &Self, sender: Option<&BoxedValue>, parameter: Option<&BoxedValue>) -> Option<BoxedValue>
```

Reverts the previously applied action.

Returns the result of the revert operation.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactivity/contract/i_reversible_action.rs#L18)

## Availability

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