pub struct Scheduler { /* private fields */ }
Expand description
Scheduler represents the scheduling attributes for a process. It is based on the Linux sched_setattr(2) syscall.
Implementations§
source§impl Scheduler
impl Scheduler
sourcepub fn policy(&self) -> &LinuxSchedulerPolicy
pub fn policy(&self) -> &LinuxSchedulerPolicy
Policy represents the scheduling policy (e.g., SCHED_FIFO, SCHED_RR, SCHED_OTHER).
sourcepub fn nice(&self) -> &Option<i32>
pub fn nice(&self) -> &Option<i32>
Nice is the nice value for the process, which affects its priority.
sourcepub fn flags(&self) -> &Option<Vec<LinuxSchedulerFlag>>
pub fn flags(&self) -> &Option<Vec<LinuxSchedulerFlag>>
Flags is an array of scheduling flags.
sourcepub fn runtime(&self) -> &Option<u64>
pub fn runtime(&self) -> &Option<u64>
Runtime is the amount of time in nanoseconds during which the process is allowed to run in a given period.
source§impl Scheduler
impl Scheduler
sourcepub fn set_policy(&mut self, val: LinuxSchedulerPolicy) -> &mut Self
pub fn set_policy(&mut self, val: LinuxSchedulerPolicy) -> &mut Self
Policy represents the scheduling policy (e.g., SCHED_FIFO, SCHED_RR, SCHED_OTHER).
sourcepub fn set_nice(&mut self, val: Option<i32>) -> &mut Self
pub fn set_nice(&mut self, val: Option<i32>) -> &mut Self
Nice is the nice value for the process, which affects its priority.
sourcepub fn set_priority(&mut self, val: Option<i32>) -> &mut Self
pub fn set_priority(&mut self, val: Option<i32>) -> &mut Self
Priority represents the static priority of the process.
sourcepub fn set_flags(&mut self, val: Option<Vec<LinuxSchedulerFlag>>) -> &mut Self
pub fn set_flags(&mut self, val: Option<Vec<LinuxSchedulerFlag>>) -> &mut Self
Flags is an array of scheduling flags.
sourcepub fn set_runtime(&mut self, val: Option<u64>) -> &mut Self
pub fn set_runtime(&mut self, val: Option<u64>) -> &mut Self
Runtime is the amount of time in nanoseconds during which the process is allowed to run in a given period.
sourcepub fn set_deadline(&mut self, val: Option<u64>) -> &mut Self
pub fn set_deadline(&mut self, val: Option<u64>) -> &mut Self
Deadline is the absolute deadline for the process to complete its execution.
sourcepub fn set_period(&mut self, val: Option<u64>) -> &mut Self
pub fn set_period(&mut self, val: Option<u64>) -> &mut Self
Period is the length of the period in nanoseconds used for determining the process runtime.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Scheduler
impl<'de> Deserialize<'de> for Scheduler
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for Scheduler
impl StructuralPartialEq for Scheduler
Auto Trait Implementations§
impl Freeze for Scheduler
impl RefUnwindSafe for Scheduler
impl Send for Scheduler
impl Sync for Scheduler
impl Unpin for Scheduler
impl UnwindSafe for Scheduler
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)