# ReactiveCommand

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-reactiveui/reactive_command/struct-reactivecommand/

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

```rust
struct ReactiveCommand<P, R>
```

A reactive command with a parameter of type `P` and results of type `R`
(`ReactiveCommand<TParam, TResult>`). It is a shared handle: clones are the same command.

Its factories are the associated functions of `ReactiveCommand` (`ReactiveCommand::create`,
`create_from_observable`, `create_from_task`, `create_run_in_background`, `create_combined`).

Deviation (DEVIATIONS.md, ReactiveUI): the parameter has a default (`P: Default`), which
`Execute()` and `ICommand.Execute(null)` pass where upstream passes `default(TParam)`; a command
whose parameter may be missing takes an `Option`.

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

## Members

- [`create`](#function-create)
- [`create_with`](#function-create_with)
- [`try_create`](#function-try_create)
- [`try_create_with`](#function-try_create_with)
- [`create_param`](#function-create_param)
- [`create_param_with`](#function-create_param_with)
- [`try_create_param`](#function-try_create_param)
- [`try_create_param_with`](#function-try_create_param_with)
- [`create_run_in_background`](#function-create_run_in_background)
- [`create_run_in_background_with`](#function-create_run_in_background_with)
- [`try_create_run_in_background`](#function-try_create_run_in_background)
- [`try_create_run_in_background_with`](#function-try_create_run_in_background_with)
- [`create_run_in_background_param`](#function-create_run_in_background_param)
- [`create_run_in_background_param_with`](#function-create_run_in_background_param_with)
- [`try_create_run_in_background_param`](#function-try_create_run_in_background_param)
- [`try_create_run_in_background_param_with`](#function-try_create_run_in_background_param_with)
- [`create_combined`](#function-create_combined)
- [`create_combined_with`](#function-create_combined_with)
- [`create_from_observable`](#function-create_from_observable)
- [`create_from_observable_with`](#function-create_from_observable_with)
- [`try_create_from_observable`](#function-try_create_from_observable)
- [`try_create_from_observable_with`](#function-try_create_from_observable_with)
- [`create_from_observable_param`](#function-create_from_observable_param)
- [`create_from_observable_param_with`](#function-create_from_observable_param_with)
- [`try_create_from_observable_param`](#function-try_create_from_observable_param)
- [`try_create_from_observable_param_with`](#function-try_create_from_observable_param_with)
- [`create_from_task`](#function-create_from_task)
- [`create_from_task_with`](#function-create_from_task_with)
- [`create_from_task_param`](#function-create_from_task_param)
- [`create_from_task_param_with`](#function-create_from_task_param_with)
- [`create_from_task_cancellable`](#function-create_from_task_cancellable)
- [`create_from_task_cancellable_with`](#function-create_from_task_cancellable_with)
- [`create_from_task_param_cancellable`](#function-create_from_task_param_cancellable)
- [`create_from_task_param_cancellable_with`](#function-create_from_task_param_cancellable_with)
- [`can_execute`](#function-can_execute)
- [`is_executing`](#function-is_executing)
- [`thrown_exceptions`](#function-thrown_exceptions)
- [`execute`](#function-execute)
- [`execute_default`](#function-execute_default)
- [`as_observable`](#function-as_observable)

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

### create

```rust
fn create<R: Clone + 'static>(execute: impl Fn() -> R + 'static) -> ReactiveCommand<(), R>
```

A command without a parameter that runs `execute` and notifies what it returns
(`Create(Action)`, `Create<TResult>(Func<TResult>)`).

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

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

### create_with

```rust
fn create_with<R: Clone + 'static>(execute: impl Fn() -> R + 'static, can_execute: OptionalCanExecute, output_scheduler: OptionalScheduler) -> ReactiveCommand<(), R>
```

`create` with the observable that gates the command and the scheduler its
streams notify on (`Create(Action, IObservable<bool>?, IScheduler?)` and the overloads
with one of the two).

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

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

### try_create

```rust
fn try_create<R: Clone + 'static>(execute: impl Fn() -> Result<R, ObservableError> + 'static) -> ReactiveCommand<(), R>
```

`create` with a function that may fail; its error goes to the execution and
to `ThrownExceptions` (`Create` with a function that throws).

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

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

### try_create_with

```rust
fn try_create_with<R: Clone + 'static>(execute: impl Fn() -> Result<R, ObservableError> + 'static, can_execute: OptionalCanExecute, output_scheduler: OptionalScheduler) -> ReactiveCommand<(), R>
```

`try_create` with the gate and the output scheduler.

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

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

### create_param

```rust
fn create_param<P: Clone + Default + 'static, R: Clone + 'static>(execute: impl Fn(P) -> R + 'static) -> ReactiveCommand<P, R>
```

A command with a parameter that runs `execute` with it and notifies what it returns
(`Create<TParam>(Action<TParam>)`, `Create<TParam, TResult>(Func<TParam, TResult>)`).

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

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

### create_param_with

```rust
fn create_param_with<P: Clone + Default + 'static, R: Clone + 'static>(execute: impl Fn(P) -> R + 'static, can_execute: OptionalCanExecute, output_scheduler: OptionalScheduler) -> ReactiveCommand<P, R>
```

`create_param` with the gate and the output scheduler.

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

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

### try_create_param

```rust
fn try_create_param<P: Clone + Default + 'static, R: Clone + 'static>(execute: impl Fn(P) -> Result<R, ObservableError> + 'static) -> ReactiveCommand<P, R>
```

`create_param` with a function that may fail.

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

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

### try_create_param_with

```rust
fn try_create_param_with<P: Clone + Default + 'static, R: Clone + 'static>(execute: impl Fn(P) -> Result<R, ObservableError> + 'static, can_execute: OptionalCanExecute, output_scheduler: OptionalScheduler) -> ReactiveCommand<P, R>
```

`try_create_param` with the gate and the output scheduler.

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

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

### create_run_in_background

```rust
fn create_run_in_background<R: Clone + 'static>(execute: impl Fn() -> R + 'static) -> ReactiveCommand<(), R>
```

A command without a parameter that runs `execute` on the background scheduler
(`RxSchedulers::task_pool_scheduler` by default) and notifies what it returns
(`CreateRunInBackground(Action)`, `CreateRunInBackground<TResult>(Func<TResult>)`).

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

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

### create_run_in_background_with

```rust
fn create_run_in_background_with<R: Clone + 'static>(execute: impl Fn() -> R + 'static, can_execute: OptionalCanExecute, background_scheduler: OptionalScheduler, output_scheduler: OptionalScheduler) -> ReactiveCommand<(), R>
```

`create_run_in_background` with the gate, the background
scheduler and the output scheduler (`CreateRunInBackground(Action, IObservable<bool>?,
IScheduler?, IScheduler?)` and the overloads with some of them).

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

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

### try_create_run_in_background

```rust
fn try_create_run_in_background<R: Clone + 'static>(execute: impl Fn() -> Result<R, ObservableError> + 'static) -> ReactiveCommand<(), R>
```

`create_run_in_background` with a function that may fail.

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

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

### try_create_run_in_background_with

```rust
fn try_create_run_in_background_with<R: Clone + 'static>(execute: impl Fn() -> Result<R, ObservableError> + 'static, can_execute: OptionalCanExecute, background_scheduler: OptionalScheduler, output_scheduler: OptionalScheduler) -> ReactiveCommand<(), R>
```

`try_create_run_in_background` with the gate, the
background scheduler and the output scheduler.

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

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

### create_run_in_background_param

```rust
fn create_run_in_background_param<P: Clone + Default + 'static, R: Clone + 'static>(execute: impl Fn(P) -> R + 'static) -> ReactiveCommand<P, R>
```

A command with a parameter that runs `execute` with it on the background scheduler
(`CreateRunInBackground<TParam>(Action<TParam>)`,
`CreateRunInBackground<TParam, TResult>(Func<TParam, TResult>)`).

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

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

### create_run_in_background_param_with

```rust
fn create_run_in_background_param_with<P: Clone + Default + 'static, R: Clone + 'static>(execute: impl Fn(P) -> R + 'static, can_execute: OptionalCanExecute, background_scheduler: OptionalScheduler, output_scheduler: OptionalScheduler) -> ReactiveCommand<P, R>
```

`create_run_in_background_param` with the gate, the
background scheduler and the output scheduler.

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

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

### try_create_run_in_background_param

```rust
fn try_create_run_in_background_param<P: Clone + Default + 'static, R: Clone + 'static>(execute: impl Fn(P) -> Result<R, ObservableError> + 'static) -> ReactiveCommand<P, R>
```

`create_run_in_background_param` with a function
that may fail.

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

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

### try_create_run_in_background_param_with

```rust
fn try_create_run_in_background_param_with<P: Clone + Default + 'static, R: Clone + 'static>(execute: impl Fn(P) -> Result<R, ObservableError> + 'static, can_execute: OptionalCanExecute, background_scheduler: OptionalScheduler, output_scheduler: OptionalScheduler) -> ReactiveCommand<P, R>
```

`try_create_run_in_background_param` with the
gate, the background scheduler and the output scheduler.

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

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

### create_combined

```rust
fn create_combined<P, R, C>(child_commands: impl IntoIterator<Item = C>) -> CombinedReactiveCommand<P, R>
where P: Clone + Default + 'static,
      R: Clone + 'static,
      C: IReactiveCommandOf<P, R> + 'static
```

A command that executes every child command with its parameter, and notifies the list of
their results (`CreateCombined<TParam, TResult>(IEnumerable<ReactiveCommandBase<TParam, TResult>>)`).
## Panics
When there is no child command (`ArgumentException`).

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

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

### create_combined_with

```rust
fn create_combined_with<P, R, C>(child_commands: impl IntoIterator<Item = C>, can_execute: OptionalCanExecute, output_scheduler: OptionalScheduler) -> CombinedReactiveCommand<P, R>
where P: Clone + Default + 'static,
      R: Clone + 'static,
      C: IReactiveCommandOf<P, R> + 'static
```

`create_combined` with the observable that gates the combined
command and the output scheduler.

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

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

### create_from_observable

```rust
fn create_from_observable<R: Clone + 'static>(execute: impl Fn() -> Rc<dyn IObservable<R>> + 'static) -> ReactiveCommand<(), R>
```

A command without a parameter whose execution is the observable `execute` gives
(`CreateFromObservable<TResult>(Func<IObservable<TResult>>)`).

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

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

### create_from_observable_with

```rust
fn create_from_observable_with<R: Clone + 'static>(execute: impl Fn() -> Rc<dyn IObservable<R>> + 'static, can_execute: OptionalCanExecute, output_scheduler: OptionalScheduler) -> ReactiveCommand<(), R>
```

`create_from_observable` with the gate and the output
scheduler.

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

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

### try_create_from_observable

```rust
fn try_create_from_observable<R: Clone + 'static>(execute: impl Fn() -> Result<Rc<dyn IObservable<R>>, ObservableError> + 'static) -> ReactiveCommand<(), R>
```

`create_from_observable` with a function that may fail; its
error fails the execution.

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

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

### try_create_from_observable_with

```rust
fn try_create_from_observable_with<R: Clone + 'static>(execute: impl Fn() -> Result<Rc<dyn IObservable<R>>, ObservableError> + 'static, can_execute: OptionalCanExecute, output_scheduler: OptionalScheduler) -> ReactiveCommand<(), R>
```

`try_create_from_observable` with the gate and the
output scheduler.

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

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

### create_from_observable_param

```rust
fn create_from_observable_param<P: Clone + Default + 'static, R: Clone + 'static>(execute: impl Fn(P) -> Rc<dyn IObservable<R>> + 'static) -> ReactiveCommand<P, R>
```

A command with a parameter whose execution is the observable `execute` gives for it
(`CreateFromObservable<TParam, TResult>(Func<TParam, IObservable<TResult>>)`).

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

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

### create_from_observable_param_with

```rust
fn create_from_observable_param_with<P: Clone + Default + 'static, R: Clone + 'static>(execute: impl Fn(P) -> Rc<dyn IObservable<R>> + 'static, can_execute: OptionalCanExecute, output_scheduler: OptionalScheduler) -> ReactiveCommand<P, R>
```

`create_from_observable_param` with the gate and the
output scheduler.

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

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

### try_create_from_observable_param

```rust
fn try_create_from_observable_param<P: Clone + Default + 'static, R: Clone + 'static>(execute: impl Fn(P) -> Result<Rc<dyn IObservable<R>>, ObservableError> + 'static) -> ReactiveCommand<P, R>
```

`create_from_observable_param` with a function that
may fail.

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

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

### try_create_from_observable_param_with

```rust
fn try_create_from_observable_param_with<P: Clone + Default + 'static, R: Clone + 'static>(execute: impl Fn(P) -> Result<Rc<dyn IObservable<R>>, ObservableError> + 'static, can_execute: OptionalCanExecute, output_scheduler: OptionalScheduler) -> ReactiveCommand<P, R>
```

`try_create_from_observable_param` with the gate
and the output scheduler.

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

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

### create_from_task

```rust
fn create_from_task<R: Clone + 'static, Fut: Future<Output = Result<R, ObservableError>> + 'static>(execute: impl Fn() -> Fut + 'static) -> ReactiveCommand<(), R>
```

A command without a parameter whose execution runs the future `execute` gives, as a task
of the thread, and notifies its result (`CreateFromTask<TResult>(Func<Task<TResult>>)`,
`CreateFromTask(Func<Task>)` for `R = ()`). Disposing the execution does not stop the task.

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

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

### create_from_task_with

```rust
fn create_from_task_with<R: Clone + 'static, Fut: Future<Output = Result<R, ObservableError>> + 'static>(execute: impl Fn() -> Fut + 'static, can_execute: OptionalCanExecute, output_scheduler: OptionalScheduler) -> ReactiveCommand<(), R>
```

`create_from_task` with the gate and the output scheduler.

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

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

### create_from_task_param

```rust
fn create_from_task_param<P: Clone + Default + 'static, R: Clone + 'static, Fut: Future<Output = Result<R, ObservableError>> + 'static>(execute: impl Fn(P) -> Fut + 'static) -> ReactiveCommand<P, R>
```

A command with a parameter whose execution runs the future `execute` gives for it
(`CreateFromTask<TParam, TResult>(Func<TParam, Task<TResult>>)`,
`CreateFromTask<TParam>(Func<TParam, Task>)` for `R = ()`).

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

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

### create_from_task_param_with

```rust
fn create_from_task_param_with<P: Clone + Default + 'static, R: Clone + 'static, Fut: Future<Output = Result<R, ObservableError>> + 'static>(execute: impl Fn(P) -> Fut + 'static, can_execute: OptionalCanExecute, output_scheduler: OptionalScheduler) -> ReactiveCommand<P, R>
```

`create_from_task_param` with the gate and the output
scheduler.

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

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

### create_from_task_cancellable

```rust
fn create_from_task_cancellable<R: Clone + 'static, Fut: Future<Output = Result<R, ObservableError>> + 'static>(execute: impl Fn(CancellationToken) -> Fut + 'static) -> ReactiveCommand<(), R>
```

A command without a parameter whose execution runs the future `execute` gives for a
cancellation token; disposing the execution cancels the token, and the command stays
executing until the future ends (`CreateFromTask<TResult>(Func<CancellationToken,
Task<TResult>>)`, `CreateFromTask(Func<CancellationToken, Task>)` for `R = ()`).

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

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

### create_from_task_cancellable_with

```rust
fn create_from_task_cancellable_with<R: Clone + 'static, Fut: Future<Output = Result<R, ObservableError>> + 'static>(execute: impl Fn(CancellationToken) -> Fut + 'static, can_execute: OptionalCanExecute, output_scheduler: OptionalScheduler) -> ReactiveCommand<(), R>
```

`create_from_task_cancellable` with the gate and the
output scheduler.

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

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

### create_from_task_param_cancellable

```rust
fn create_from_task_param_cancellable<P: Clone + Default + 'static, R: Clone + 'static, Fut: Future<Output = Result<R, ObservableError>> + 'static>(execute: impl Fn(P, CancellationToken) -> Fut + 'static) -> ReactiveCommand<P, R>
```

A command with a parameter whose execution runs the future `execute` gives for it and a
cancellation token (`CreateFromTask<TParam, TResult>(Func<TParam, CancellationToken,
Task<TResult>>)`, `CreateFromTask<TParam>(Func<TParam, CancellationToken, Task>)` for
`R = ()`).

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

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

### create_from_task_param_cancellable_with

```rust
fn create_from_task_param_cancellable_with<P: Clone + Default + 'static, R: Clone + 'static, Fut: Future<Output = Result<R, ObservableError>> + 'static>(execute: impl Fn(P, CancellationToken) -> Fut + 'static, can_execute: OptionalCanExecute, output_scheduler: OptionalScheduler) -> ReactiveCommand<P, R>
```

`create_from_task_param_cancellable` with the
gate and the output scheduler.

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

<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 an execution is in flight, and false after the gate failed (`CanExecute`).

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

<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/reactive_command_t_param_t_result.rs#L184)

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

### thrown_exceptions

```rust
fn thrown_exceptions(self: &Self) -> Rc<dyn IObservable<ObservableError>>
```

The errors of the executions and of the gate, on the output scheduler
(`ThrownExceptions`). While nothing observes it, an error goes to
`RxState::default_exception_handler`.

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

<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` each time it is subscribed, and
notifies the results of that execution (`Execute(TParam)`). Nothing runs until it is
subscribed; disposing the subscription cancels the execution.

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

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

### execute_default

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

`execute` with the default parameter (`Execute()`).

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

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

### as_observable

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

The command as the observable of its results, which the operators take.

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

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `CloneToUninit`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- `ToOwned`
- [`SubscribeGuard<T>`](/docs/0.5.0/api/ferroui-base/reactive/use-subscribeguard/)
- [`CommandValue`](/docs/0.5.0/api/ferroui-reactiveui/binding/mixins/trait-commandvalue/)
- `Clone`
- `PartialEq`
- `Debug`
- [`IObservable<R>`](/docs/0.5.0/api/ferroui-base/reactive/use-iobservable/)
- [`IDisposable`](/docs/0.5.0/api/ferroui-base/reactive/use-idisposable/)
- [`IHandleObservableErrors`](/docs/0.5.0/api/ferroui-reactiveui/interfaces/trait-ihandleobservableerrors/)
- [`IReactiveCommand`](/docs/0.5.0/api/ferroui-reactiveui/reactive_command/trait-ireactivecommand/)
- [`IReactiveCommandOf<P, R>`](/docs/0.5.0/api/ferroui-reactiveui/reactive_command/trait-ireactivecommandof/)
- [`ICommand`](/docs/0.5.0/api/ferroui-base/data/model/trait-icommand/)

## Availability

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