#[repr(u8)]pub enum Priority {
Critical = 0,
High = 1,
Normal = 2,
Low = 3,
}Expand description
Priority class. Lower discriminant = more important.
Classes set the base of a task’s effective score; waiting time adds a capped aging bonus
and deadlines add urgency (see PriorityConfig and
UrgencyConfig).
Variants§
Critical = 0
Work that must run before anything else (alerts, interactive critical paths).
High = 1
Latency-sensitive work (interactive requests).
Normal = 2
Regular work (the default).
Low = 3
Background work that runs when nothing more important is waiting.
Implementations§
Source§impl Priority
impl Priority
Sourcepub fn index(self) -> usize
pub fn index(self) -> usize
Position in Priority::ALL (0 = Critical).
Sourcepub fn from_index(i: usize) -> Option<Priority>
pub fn from_index(i: usize) -> Option<Priority>
The class at i in Priority::ALL.
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