# ReversibleActionExecution

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-xaml-interactions/struct-reversibleactionexecution/

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

```rust
struct ReversibleActionExecution
```

Executes the actions of a collection, the reversible ones reversibly (an internal class of the
reference).

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions/core/reversible_action_execution.rs#L9)

## Members

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

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

### execute

```rust
fn execute(sender: Option<&BoxedValue>, actions: Option<&ActionCollection>, parameter: Option<&BoxedValue>) -> Vec<Ref<FerroObject>>
```

Executes the actions of `actions`: a reversible action with
`IReversibleAction::execute_reversibly`, any other action with `IAction::execute`.
Returns the reversible actions that applied (whose result is not `false`), in the order of
the actions.
## Panics
Re-raises the panic of an action, after reverting the reversible actions that applied
before it, last first (a panic while reverting is dropped, so that the panic of the
action is the one raised).

Deviation (DEVIATIONS.md, Behaviors): the applied actions are returned as the objects of
the actions (a contract of an object is found through the object).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions/core/reversible_action_execution.rs#L29)

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

### revert

```rust
fn revert(applied_actions: &[Ref<FerroObject>], sender: Option<&BoxedValue>, parameter: Option<&BoxedValue>)
```

Reverts `applied_actions`, last first (the loop of the triggers that revert the actions
they applied).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Behaviors/FerroUI.Xaml.Interactions/core/reversible_action_execution.rs#L74)

## Trait implementations

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

## Availability

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