# ISuspensionHostOf

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

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

```rust
trait ISuspensionHostOf<T: 'static>: ISuspensionHost
```

A suspension host whose state of the application has the type `T` (`ISuspensionHost<TAppState>`).

It keeps the observables of [`ISuspensionHost`](/docs/0.5.0/api/ferroui-reactiveui/interfaces/trait-isuspensionhost/) and adds the typed state; the untyped
`app_state` of an implementation is a view of the typed one.
The state is shared (`Rc<T>`), as the class of upstream is a reference.

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

## Members

- [`create_new_app_state_typed`](#function-create_new_app_state_typed)
- [`set_create_new_app_state_typed`](#function-set_create_new_app_state_typed)
- [`app_state_value`](#function-app_state_value)
- [`set_app_state_value`](#function-set_app_state_value)
- [`app_state_value_changed`](#function-app_state_value_changed)

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

### create_new_app_state_typed

```rust
fn create_new_app_state_typed(self: &Self) -> Option<TypedAppStateFactory<T>>
```

The function that creates a new state (`CreateNewAppStateTyped`).

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

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

### set_create_new_app_state_typed

```rust
fn set_create_new_app_state_typed(self: &Self, value: Option<TypedAppStateFactory<T>>)
```

Sets `create_new_app_state_typed`.

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

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

### app_state_value

```rust
fn app_state_value(self: &Self) -> Option<Rc<T>>
```

The current state (`AppStateValue`).

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

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

### set_app_state_value

```rust
fn set_app_state_value(self: &Self, value: Option<Rc<T>>)
```

Sets `app_state_value`.

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

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

### app_state_value_changed

```rust
fn app_state_value_changed(self: &Self) -> Rc<dyn IObservable<Option<Rc<T>>>>
```

Ticks with the state each time `app_state_value` is set; it does
not replay the current one (`AppStateValueChanged`).

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

## Trait implementations

- [`ISuspensionHostOf<T>`](/docs/0.5.0/api/ferroui-reactiveui/interfaces/trait-isuspensionhostof/)

## Availability

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