# CombinedReactiveCommand

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

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

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

A command that executes child commands together (`CombinedReactiveCommand<TParam, TResult>`):
its result is the list of the results of the children. It is a shared handle: clones are the
same command.

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

## Members

- [`new`](#function-new)
- [`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-new"></a>

### new

```rust
fn new(child_commands: impl IntoIterator<Item = Rc<dyn IReactiveCommandOf<P, R>>>, can_execute: Option<Rc<dyn IObservable<bool>>>, output_scheduler: Option<Rc<dyn IScheduler>>) -> Self
```

A command that executes `child_commands` together, gated by `can_execute` (always
executable when `None`) and every child, with its streams on `output_scheduler`
(`RxSchedulers::main_thread_scheduler` when
`None`) (`protected internal CombinedReactiveCommand(IEnumerable<ReactiveCommandBase<TParam,
TResult>>, IObservable<bool>?, IScheduler?)` and its two shorter overloads).
## Panics
When there is no child command (`ArgumentException: No child commands provided.`).

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

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

### can_execute

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

Whether the combined command can execute (`CanExecute`): the parent gate and every child
can, and no execution is in flight.

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

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

### is_executing

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

Whether the combined command is executing (`IsExecuting`).

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

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

### thrown_exceptions

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

The errors of the children and of the parent gate (`ThrownExceptions`).

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

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

### execute

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

An observable that executes every child with `parameter` when it is subscribed, and
notifies the list of their results (`Execute(TParam)`).

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

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

### execute_default

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

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

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

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

### as_observable

```rust
fn as_observable(self: &Self) -> Rc<dyn IObservable<Vec<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/combined_reactive_command.rs#L149)

## 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<Vec<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, Vec<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/).
