# ActivationSignals

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-reactiveui/activation/struct-activationsignals/

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

```rust
struct ActivationSignals
```

The handling of the activation signals of the views of a user-interface toolkit
(`ActivationSignals`).

The views of a toolkit derive from unrelated base types, so the handling of their
`Activated`/`Deactivated` subjects cannot be inherited and lives here. A view implements
`ICanActivate` with two subjects, raises them with
`raise`, and disposes them with `dispose_when`.

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

## Members

- [`raise`](#function-raise)
- [`dispose_when`](#function-dispose_when)
- [`dispose_when_with`](#function-dispose_when_with)
- [`schedule_activation`](#function-schedule_activation)

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

### raise

```rust
fn raise(signal: &Rc<Subject<()>>)
```

Notifies the subscribers that the view was activated or deactivated (`Raise`). A view can
be called back by the platform after it was disposed: a disposed signal is left alone
rather than panicking.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI/activation/activation_signals.rs#L24)

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

### dispose_when

```rust
fn dispose_when(disposing: bool, activated: &Rc<Subject<()>>, deactivated: &Rc<Subject<()>>)
```

Disposes the activation signals of a view when it is disposed deterministically
(`DisposeWhen(bool, Signal, Signal)`); nothing happens when `disposing` is false.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI/activation/activation_signals.rs#L33)

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

### dispose_when_with

```rust
fn dispose_when_with<T: Clone + 'static>(disposing: bool, activated: &Rc<Subject<()>>, deactivated: &Rc<Subject<()>>, additional: &Rc<Subject<T>>)
```

`dispose_when` with one more signal of the view, disposed last
(`DisposeWhen<TResult>(bool, Signal, Signal, Signal<TResult>)`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI/activation/activation_signals.rs#L43)

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

### schedule_activation

```rust
fn schedule_activation(is_activating: bool, activated: &Rc<Subject<()>>, deactivated: &Rc<Subject<()>>)
```

Raises the activation or the deactivation on `RxSchedulers::main_thread_scheduler`
(`ScheduleActivation`), for `ICanForceManualActivation::activate`. The view may be disposed
before the work runs; the work then does nothing.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI/activation/activation_signals.rs#L60)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`

## Availability

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