# IReactiveCommandOf

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

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

```rust
trait IReactiveCommandOf<P, R>: IObservable<R> + IReactiveCommand
```

A reactive command with its parameter and result types (`IReactiveCommand<TParam, TResult>`).
As an observable it notifies the results of every execution.

Deviation (DEVIATIONS.md, ReactiveUI): Rust has one name per trait, so the generic interface,
which upstream overloads on the name `IReactiveCommand`, is `IReactiveCommandOf`. The overload
`Execute()` is `execute_default`.

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

## Members

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

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

### execute

```rust
fn execute(self: &Self, parameter: P) -> Rc<dyn IObservable<R>>
```

An observable that executes the command with `parameter` when it is subscribed, and
notifies the results of that execution (`Execute(TParam)`). Nothing runs until it is
subscribed.

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

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

### execute_default

```rust
fn execute_default(self: &Self) -> Rc<dyn IObservable<R>>
```

`execute` with the default parameter (`Execute()`, which passes
`default(TParam)`).

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

## Trait implementations

- [`IReactiveCommandOf<P, Vec<R>>`](/docs/0.5.0/api/ferroui-reactiveui/reactive_command/trait-ireactivecommandof/)
- [`IReactiveCommandOf<P, R>`](/docs/0.5.0/api/ferroui-reactiveui/reactive_command/trait-ireactivecommandof/)

## Availability

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