pub enum Priority {
Low = 0,
Normal = 1,
High = 2,
Critical = 3,
}Expand description
Priority levels for task scheduling.
Variants§
Low = 0
Low priority tasks (background work)
Normal = 1
Normal priority tasks (default)
High = 2
High priority tasks (interactive work)
Critical = 3
Critical priority tasks (system-level work)
Implementations§
Source§impl Priority
impl Priority
Sourcepub const fn index(self) -> usize
pub const fn index(self) -> usize
Scheduling index of this priority: Low = 0, Normal = 1, High = 2,
Critical = 3.
Single source of truth for the priority-to-index mapping used by priority-partitioned queues and worker/route selection weights.
§Examples
use moirai_core::Priority;
assert_eq!(Priority::Low.index(), 0);
assert_eq!(Priority::Critical.index(), 3);Trait Implementations§
impl Copy for Priority
impl Eq for Priority
Source§impl Ord for Priority
impl Ord for Priority
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for Priority
impl PartialOrd 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 UnsafeUnpin 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