# SchedulerDefaults

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-reactive/concurrency/struct-schedulerdefaults/

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

```rust
struct SchedulerDefaults
```

The schedulers that operators use when the caller names none (`SchedulerDefaults`).

Deviation (DEVIATIONS.md, Reactive): upstream runs time-based operators and asynchronous
conversions on the thread pool (`DefaultScheduler`). The port is single-threaded: those use the
default scheduler of the thread, which an application sets (the integration with FerroUI sets
the scheduler of the dispatcher of the user-interface thread) and which is the current-thread
scheduler until it does.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Reactive/concurrency/scheduler_defaults.rs#L21)

## Members

- [`constant_time_operations`](#function-constant_time_operations)
- [`tail_recursion`](#function-tail_recursion)
- [`iteration`](#function-iteration)
- [`time_based_operations`](#function-time_based_operations)
- [`async_conversions`](#function-async_conversions)
- [`default_scheduler`](#function-default_scheduler)
- [`set_default_scheduler`](#function-set_default_scheduler)

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

### constant_time_operations

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

Operators that take constant time (`ConstantTimeOperations`): the immediate scheduler.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Reactive/concurrency/scheduler_defaults.rs#L25)

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

### tail_recursion

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

Tail recursion (`TailRecursion`): the immediate scheduler.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Reactive/concurrency/scheduler_defaults.rs#L30)

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

### iteration

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

Iteration (`Iteration`): the current-thread scheduler.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Reactive/concurrency/scheduler_defaults.rs#L35)

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

### time_based_operations

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

Time-based operations (`TimeBasedOperations`): the default scheduler of the thread.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Reactive/concurrency/scheduler_defaults.rs#L40)

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

### async_conversions

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

Asynchronous conversions (`AsyncConversions`): the default scheduler of the thread.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Reactive/concurrency/scheduler_defaults.rs#L45)

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

### default_scheduler

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

The default scheduler of the thread (`DefaultScheduler.Instance`): the one set with
`set_default_scheduler`, else the current-thread scheduler.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Reactive/concurrency/scheduler_defaults.rs#L51)

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

### set_default_scheduler

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

Sets the default scheduler of the thread; `None` restores the current-thread scheduler.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Reactive/concurrency/scheduler_defaults.rs#L56)

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