pub struct SchedulingProfile { /* private fields */ }Expand description
Scheduler inputs advertised by one core.
Implementations§
Source§impl SchedulingProfile
impl SchedulingProfile
Sourcepub fn new(
weight: u16,
priority: i16,
max_concurrency: u32,
workload: WorkloadClass,
) -> ContractResult<Self>
pub fn new( weight: u16, priority: i16, max_concurrency: u32, workload: WorkloadClass, ) -> ContractResult<Self>
Creates scheduler inputs with an empty affinity set.
Sourcepub fn with_availability(self, available: bool) -> Self
pub fn with_availability(self, available: bool) -> Self
Marks current scheduling availability.
Sourcepub fn with_affinity(self, affinity: impl Into<String>) -> ContractResult<Self>
pub fn with_affinity(self, affinity: impl Into<String>) -> ContractResult<Self>
Adds a validated affinity label.
Sourcepub fn max_concurrency(&self) -> u32
pub fn max_concurrency(&self) -> u32
Returns maximum accepted concurrency.
Sourcepub fn is_available(&self) -> bool
pub fn is_available(&self) -> bool
Reports whether this core currently accepts work.
Sourcepub fn workload(&self) -> WorkloadClass
pub fn workload(&self) -> WorkloadClass
Returns the workload class.
Trait Implementations§
Source§impl Clone for SchedulingProfile
impl Clone for SchedulingProfile
Source§fn clone(&self) -> SchedulingProfile
fn clone(&self) -> SchedulingProfile
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 moreSource§impl Debug for SchedulingProfile
impl Debug for SchedulingProfile
Source§impl<'de> Deserialize<'de> for SchedulingProfile
impl<'de> Deserialize<'de> for SchedulingProfile
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>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for SchedulingProfile
Source§impl PartialEq for SchedulingProfile
impl PartialEq for SchedulingProfile
Source§impl Serialize for SchedulingProfile
impl Serialize for SchedulingProfile
impl StructuralPartialEq for SchedulingProfile
Auto Trait Implementations§
impl Freeze for SchedulingProfile
impl RefUnwindSafe for SchedulingProfile
impl Send for SchedulingProfile
impl Sync for SchedulingProfile
impl Unpin for SchedulingProfile
impl UnsafeUnpin for SchedulingProfile
impl UnwindSafe for SchedulingProfile
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