# ReactiveCommandAdapter

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-reactiveui-controls/struct-reactivecommandadapter/

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

```rust
struct ReactiveCommandAdapter
```

A command of ReactiveUI as a command of FerroUI: each member forwards to the command it wraps,
with the parameter seen as `&dyn Any`.

Deviation (DEVIATIONS.md, ReactiveUI controls): upstream sets the command itself as the
`Command` of a control; the two `ICommand`s of the port are bridged by this adapter.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI.Controls/reactive_command_adapter.rs#L24)

## Members

- [`new`](#function-new)
- [`command_of`](#function-command_of)
- [`command`](#function-command)
- [`wraps`](#function-wraps)

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

### new

```rust
fn new(command: Rc<dyn ferroui_reactiveui::ICommand>) -> Rc<Self>
```

The command of FerroUI that runs `command`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI.Controls/reactive_command_adapter.rs#L36)

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

### command_of

```rust
fn command_of(command: Rc<dyn ferroui_reactiveui::ICommand>) -> Rc<dyn ICommand>
```

`new` as the handle the `Command` property of a control holds.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI.Controls/reactive_command_adapter.rs#L41)

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

### command

```rust
fn command(self: &Self) -> &Rc<dyn ferroui_reactiveui::ICommand>
```

The command of ReactiveUI the adapter runs.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI.Controls/reactive_command_adapter.rs#L46)

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

### wraps

```rust
fn wraps(self: &Self, command: &Rc<dyn ferroui_reactiveui::ICommand>) -> bool
```

Whether the adapter runs `command` (the same object).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI.Controls/reactive_command_adapter.rs#L51)

## 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`
- `Debug`
- [`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/).
