Echo/Task/Priority.rs
1//! # Priority Enum
2//!
3//! Defines the execution priority level of a `Task` within the `Echo`
4//! scheduler.
5
6#![allow(non_snake_case, non_camel_case_types)]
7
8/// Represents the priority of a task to be executed by the scheduler.
9///
10/// This enumeration allows the scheduler to ensure that high-priority,
11
12/// user-facing operations (e.g., responding to UI input) are executed before
13/// lower-priority, long-running background tasks (e.g., file indexing).
14#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord)]
15pub enum Priority {
16 /// For tasks that directly impact perceived performance and responsiveness.
17 /// These are always executed first.
18 High,
19
20 /// The default priority for most standard operations that are not
21 /// time-critical but should not be unnecessarily delayed.
22 Normal,
23
24 /// For background tasks that are not time-sensitive and can be deferred
25 /// if higher-priority work is available.
26 Low,
27}