# as_command_source

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-controls/function-as_command_source/

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

```rust
fn as_command_source(object: &ferroui_base::FerroObject) -> Option<std::rc::Rc<dyn ICommandSource>>
```

The object viewed as a command source, if its class implements
`ICommandSource`.

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

## Availability

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