# RxSchedulers

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

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

```rust
struct RxSchedulers
```

The schedulers that ReactiveUI's objects run their work on (`RxSchedulers`), settable for
tests and by the integration with the user interface.

Deviation (DEVIATIONS.md, ReactiveUI): the schedulers are per thread, as the observables are
(`docs/porting/reactive.md`, section 5.1). Until one is set, both are the default scheduler of
the thread (`SchedulerDefaults::default_scheduler`), the port of upstream's
`Scheduler.Default` and `TaskPoolScheduler.Default`: the current-thread scheduler unless the
application set another one. Unit tests therefore run on the current-thread scheduler unless a
test sets one; the integration with FerroUI sets the scheduler of the dispatcher.

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

## Members

- [`main_thread_scheduler`](#function-main_thread_scheduler)
- [`set_main_thread_scheduler`](#function-set_main_thread_scheduler)
- [`task_pool_scheduler`](#function-task_pool_scheduler)
- [`set_task_pool_scheduler`](#function-set_task_pool_scheduler)
- [`suppress_view_command_binding_message`](#function-suppress_view_command_binding_message)
- [`set_suppress_view_command_binding_message`](#function-set_suppress_view_command_binding_message)

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

### main_thread_scheduler

```rust
fn main_thread_scheduler() -> Rc<dyn IScheduler>
```

The scheduler of the user-interface thread (`MainThreadScheduler`).

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

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

### set_main_thread_scheduler

```rust
fn set_main_thread_scheduler(scheduler: Rc<dyn IScheduler>)
```

Sets the scheduler of the user-interface thread (`MainThreadScheduler { set; }`).

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

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

### task_pool_scheduler

```rust
fn task_pool_scheduler() -> Rc<dyn IScheduler>
```

The scheduler of background work (`TaskpoolScheduler`).

Deviation (DEVIATIONS.md, ReactiveUI): the work of the thread pool cannot run
single-threaded observables, so this is a scheduler of the current thread unless one is
set; work for another thread goes through `ferroui_system::threading::tasks::run`.

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

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

### set_task_pool_scheduler

```rust
fn set_task_pool_scheduler(scheduler: Rc<dyn IScheduler>)
```

Sets the scheduler of background work (`TaskpoolScheduler { set; }`).

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

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

### suppress_view_command_binding_message

```rust
fn suppress_view_command_binding_message() -> bool
```

Whether the bindings of commands skip the message they log when a view has no command of
the name (`SuppressViewCommandBindingMessage`).

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

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

### set_suppress_view_command_binding_message

```rust
fn set_suppress_view_command_binding_message(value: bool)
```

Sets `suppress_view_command_binding_message`.

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

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