# DispatcherPriority

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-base/threading/struct-dispatcherpriority/

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

```rust
struct DispatcherPriority
```

Defines the priorities with which jobs can be invoked on a
`Dispatcher`.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/threading/dispatcher_priority.rs#L6)

## Members

- [`value`](#function-value)
- [`DEFAULT`](#assoc_const-default)
- [`INPUT`](#assoc_const-input)
- [`BACKGROUND`](#assoc_const-background)
- [`CONTEXT_IDLE`](#assoc_const-context_idle)
- [`APPLICATION_IDLE`](#assoc_const-application_idle)
- [`SYSTEM_IDLE`](#assoc_const-system_idle)
- [`INACTIVE`](#assoc_const-inactive)
- [`INVALID`](#assoc_const-invalid)
- [`LOADED`](#assoc_const-loaded)
- [`UI_THREAD_RENDER`](#assoc_const-ui_thread_render)
- [`AFTER_RENDER`](#assoc_const-after_render)
- [`RENDER`](#assoc_const-render)
- [`BEFORE_RENDER`](#assoc_const-before_render)
- [`ASYNC_RENDER_TARGET_RESIZE`](#assoc_const-async_render_target_resize)
- [`DATA_BIND`](#assoc_const-data_bind)
- [`NORMAL`](#assoc_const-normal)
- [`SEND`](#assoc_const-send)
- [`MAX_VALUE`](#assoc_const-max_value)
- [`from_value`](#function-from_value)
- [`validate`](#function-validate)

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

### value

```rust
const fn value(self: Self) -> i32
```

The numeric value of the priority.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/threading/dispatcher_priority.rs#L17)

<a id="assoc_const-default"></a>

### DEFAULT

```rust
const DEFAULT: Self
```

The lowest foreground dispatcher priority.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/threading/dispatcher_priority.rs#L22)

<a id="assoc_const-input"></a>

### INPUT

```rust
const INPUT: Self
```

The job will be processed with the same priority as input.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/threading/dispatcher_priority.rs#L27)

<a id="assoc_const-background"></a>

### BACKGROUND

```rust
const BACKGROUND: Self
```

The job will be processed after other non-idle operations have completed.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/threading/dispatcher_priority.rs#L30)

<a id="assoc_const-context_idle"></a>

### CONTEXT_IDLE

```rust
const CONTEXT_IDLE: Self
```

The job will be processed after background operations have completed.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/threading/dispatcher_priority.rs#L33)

<a id="assoc_const-application_idle"></a>

### APPLICATION_IDLE

```rust
const APPLICATION_IDLE: Self
```

The job will be processed when the application is idle.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/threading/dispatcher_priority.rs#L36)

<a id="assoc_const-system_idle"></a>

### SYSTEM_IDLE

```rust
const SYSTEM_IDLE: Self
```

The job will be processed when the system is idle.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/threading/dispatcher_priority.rs#L39)

<a id="assoc_const-inactive"></a>

### INACTIVE

```rust
const INACTIVE: Self
```

A dispatcher priority for jobs that shouldn't be executed yet.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/threading/dispatcher_priority.rs#L45)

<a id="assoc_const-invalid"></a>

### INVALID

```rust
const INVALID: Self
```

Used internally in dispatcher code.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/threading/dispatcher_priority.rs#L51)

<a id="assoc_const-loaded"></a>

### LOADED

```rust
const LOADED: Self
```

The job will be processed after layout and render but before input.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/threading/dispatcher_priority.rs#L54)

<a id="assoc_const-ui_thread_render"></a>

### UI_THREAD_RENDER

```rust
const UI_THREAD_RENDER: Self
```

A special priority for platforms with a UI render timer or for forced
full rasterization requests.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/threading/dispatcher_priority.rs#L58)

<a id="assoc_const-after_render"></a>

### AFTER_RENDER

```rust
const AFTER_RENDER: Self
```

A special priority to synchronize native control host positions,
IME, etc. Renderer results have to be reported before any user code
and most of the system input callbacks.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/threading/dispatcher_priority.rs#L63)

<a id="assoc_const-render"></a>

### RENDER

```rust
const RENDER: Self
```

The job will be processed with the same priority as render.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/threading/dispatcher_priority.rs#L66)

<a id="assoc_const-before_render"></a>

### BEFORE_RENDER

```rust
const BEFORE_RENDER: Self
```

A special platform hook for jobs to be executed before the normal
render cycle.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/threading/dispatcher_priority.rs#L70)

<a id="assoc_const-async_render_target_resize"></a>

### ASYNC_RENDER_TARGET_RESIZE

```rust
const ASYNC_RENDER_TARGET_RESIZE: Self
```

A special priority for platforms that resize the render target in
asynchronous-commit mode.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/threading/dispatcher_priority.rs#L74)

<a id="assoc_const-data_bind"></a>

### DATA_BIND

```rust
const DATA_BIND: Self
```

The job will be processed with the same priority as data binding.

> **Deprecated.** WPF compatibility

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/threading/dispatcher_priority.rs#L78)

<a id="assoc_const-normal"></a>

### NORMAL

```rust
const NORMAL: Self
```

The job will be processed with normal priority.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/threading/dispatcher_priority.rs#L81)

<a id="assoc_const-send"></a>

### SEND

```rust
const SEND: Self
```

The job will be processed before other asynchronous operations.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/threading/dispatcher_priority.rs#L84)

<a id="assoc_const-max_value"></a>

### MAX_VALUE

```rust
const MAX_VALUE: Self
```

Maximum possible priority.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/threading/dispatcher_priority.rs#L87)

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

### from_value

```rust
fn from_value(value: i32) -> Self
```

Creates a priority from its numeric value.
## Panics
Panics when `value` is outside the valid range; use
`TryFrom<i32>` for untrusted input.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/threading/dispatcher_priority.rs#L94)

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

### validate

```rust
fn validate(priority: DispatcherPriority, parameter_name: &str)
```

Verifies that `priority` can be used to queue work.
## Panics
Panics when the priority is outside `INACTIVE..=MAX_VALUE`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/threading/dispatcher_priority.rs#L105)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- [`ResourceKeyObject`](/docs/0.5.0/api/ferroui-base/controls/trait-resourcekeyobject/)
- [`PropertyValue`](/docs/0.5.0/api/ferroui-base/trait-propertyvalue/)
- [`AnyValue`](/docs/0.5.0/api/ferroui-base/trait-anyvalue/)
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `Borrow<T>`
- `BorrowMut<T>`
- `CloneToUninit`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- `ToOwned`
- `ToString`
- `ErasedDestructor`
- `IntoEither`
- `Clone`
- `Copy`
- `Debug`
- `StructuralPartialEq`
- `PartialEq`
- `Eq`
- `Hash`
- `PartialOrd`
- `Ord`
- `Default`
- `TryFrom<i32>`
- `From<DispatcherPriority>`
- `Display`

## Availability

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