pub enum PriorityApplied {
Realtime,
Disabled,
Unsupported,
BestEffortFailed,
}Expand description
Outcome of a best-effort OS-scheduler priority change.
Variants§
Realtime
The OS scheduler honoured the requested priority (real-time SCHED_FIFO band applied).
Disabled
Real-time scheduling was never requested: the opt-in switch
RT_PRIORITY_ENV is off, so no scheduler call was made at
all and the thread keeps the process default policy.
Unsupported
The platform does not expose a portable scheduler priority API (e.g. Windows here, or a non-Unix target) — no change applied.
BestEffortFailed
The platform exposes the API but rejected the request (typically
the process lacks CAP_SYS_NICE/root for SCHED_FIFO). C’s
osdThread.c makes the same best-effort fall back to a non-RT
thread in this case (osdThread.c:647 “Try again without
SCHED_FIFO”).
Implementations§
Source§impl PriorityApplied
impl PriorityApplied
Sourcepub fn is_realtime(self) -> bool
pub fn is_realtime(self) -> bool
true only when the OS actually applied a real-time priority.
Trait Implementations§
Source§impl Clone for PriorityApplied
impl Clone for PriorityApplied
Source§fn clone(&self) -> PriorityApplied
fn clone(&self) -> PriorityApplied
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for PriorityApplied
Source§impl Debug for PriorityApplied
impl Debug for PriorityApplied
impl Eq for PriorityApplied
Source§impl PartialEq for PriorityApplied
impl PartialEq for PriorityApplied
impl StructuralPartialEq for PriorityApplied
Auto Trait Implementations§
impl Freeze for PriorityApplied
impl RefUnwindSafe for PriorityApplied
impl Send for PriorityApplied
impl Sync for PriorityApplied
impl Unpin for PriorityApplied
impl UnsafeUnpin for PriorityApplied
impl UnwindSafe for PriorityApplied
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