# RxSuspension

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

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

```rust
struct RxSuspension
```

The suspension host of the application, for the events of the life of its process, such as
its suspension and resumption on a mobile device (`RxSuspension`).

Unless the builder of the application published a host, the first read creates a default
[`SuspensionHost`](/docs/0.5.0/api/ferroui-reactiveui/suspension/struct-suspensionhost/); the first host published wins.

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

## Members

- [`suspension_host`](#function-suspension_host)
- [`initialize_suspension_host`](#function-initialize_suspension_host)

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

### suspension_host

```rust
fn suspension_host() -> Rc<dyn ISuspensionHost>
```

The suspension host (`SuspensionHost`): the published one, or a default one created now.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI/rx_suspension.rs#L23)

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

### initialize_suspension_host

```rust
fn initialize_suspension_host(suspension_host: Rc<dyn ISuspensionHost>)
```

Publishes `suspension_host` when no host is published yet (`InitializeSuspensionHost`),
which the builder of the application calls.

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

## 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/).
