# register_activatable_view_model

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-reactiveui/activation/function-register_activatable_view_model/

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

```rust
fn register_activatable_view_model<VM: IActivatableViewModel>()
```

Makes the view models of the type `VM` known as activatable, so that a view whose view model
is one activates it (the test `value is IActivatableViewModel` of upstream).

[`ViewModelActivationMixins`](/docs/0.5.0/api/ferroui-reactiveui/activation/trait-viewmodelactivationmixins/) calls it when a view model registers what to do on activation,
which is what every activatable view model does; a view model that only uses its activator's
observables calls it once.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI/activation/view_for_mixins.rs#L41)

## Availability

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