Echo/Task/
Priority.rs

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