pub enum Priority {
High,
Normal,
Low,
}Expand description
Represents the priority of a task to be executed by the scheduler.
This enumeration allows the scheduler to ensure that high-priority, user-facing operations (e.g., responding to UI input) are executed before lower-priority, long-running background tasks (e.g., file indexing).
Variants§
High
For tasks that directly impact perceived performance and responsiveness. These are always executed first.
Normal
The default priority for most standard operations that are not time-critical but should not be unnecessarily delayed.
Low
For background tasks that are not time-sensitive and can be deferred if higher-priority work is available.
Trait Implementations§
Source§impl Ord for Priority
impl Ord for Priority
Source§impl PartialOrd for Priority
impl PartialOrd for Priority
impl Copy for Priority
impl Eq for Priority
impl StructuralPartialEq for Priority
Auto Trait Implementations§
impl Freeze for Priority
impl RefUnwindSafe for Priority
impl Send for Priority
impl Sync for Priority
impl Unpin for Priority
impl UnwindSafe for Priority
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more