# IReactiveCommand

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-reactiveui/reactive_command/trait-ireactivecommand/

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

```rust
trait IReactiveCommand: IDisposable + IHandleObservableErrors
```

The state of a reactive command, whatever its types (`IReactiveCommand`): whether it is
executing, whether it can execute, and (through [`IHandleObservableErrors`](/docs/0.5.0/api/ferroui-reactiveui/interfaces/trait-ihandleobservableerrors/)) the errors of its
executions. Disposing it ends its subscription to the observable that gates it.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI/reactive_command/i_reactive_command.rs#L11)

## Members

- [`is_executing`](#function-is_executing)
- [`can_execute`](#function-can_execute)

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

### is_executing

```rust
fn is_executing(self: &Self) -> Rc<dyn IObservable<bool>>
```

Whether the command is executing: the current value on subscription, then each change
(`IsExecuting`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI/reactive_command/i_reactive_command.rs#L14)

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

### can_execute

```rust
fn can_execute(self: &Self) -> Rc<dyn IObservable<bool>>
```

Whether the command can execute: the current value on subscription, then each change; it
is false while the command executes (`CanExecute`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI/reactive_command/i_reactive_command.rs#L18)

## Trait implementations

- [`IReactiveCommand`](/docs/0.5.0/api/ferroui-reactiveui/reactive_command/trait-ireactivecommand/)

## Availability

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