# ICanActivate

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-reactiveui/interfaces/trait-icanactivate/

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

```rust
trait ICanActivate
```

An object that says itself when it is activated and deactivated (`ICanActivate`); a view that
implements it is activated by `CanActivateViewFetcher`.
Usually only the integration of a user-interface toolkit implements it.

A view tells the activation fetchers that it implements this trait through
`IActivatableView::as_can_activate`.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI/interfaces/i_can_activate.rs#L12)

## Members

- [`activated`](#function-activated)
- [`deactivated`](#function-deactivated)

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

### activated

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

Ticks when the object is activated (`Activated`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI/interfaces/i_can_activate.rs#L14)

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

### deactivated

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

Ticks when the object is deactivated (`Deactivated`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI/interfaces/i_can_activate.rs#L17)

## Availability

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