pub struct PriorityWeights { /* private fields */ }Expand description
Relative scheduling opportunities assigned to each priority.
Implementations§
Source§impl PriorityWeights
impl PriorityWeights
Sourcepub const fn new(
high: NonZeroUsize,
normal: NonZeroUsize,
background: NonZeroUsize,
) -> Self
pub const fn new( high: NonZeroUsize, normal: NonZeroUsize, background: NonZeroUsize, ) -> Self
Creates a set of non-zero weights.
Sourcepub const fn high(self) -> NonZeroUsize
pub const fn high(self) -> NonZeroUsize
Returns the weight for high-priority work.
Sourcepub const fn normal(self) -> NonZeroUsize
pub const fn normal(self) -> NonZeroUsize
Returns the weight for normal-priority work.
Sourcepub const fn background(self) -> NonZeroUsize
pub const fn background(self) -> NonZeroUsize
Returns the weight for background work.
Trait Implementations§
Source§impl Clone for PriorityWeights
impl Clone for PriorityWeights
Source§fn clone(&self) -> PriorityWeights
fn clone(&self) -> PriorityWeights
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 PriorityWeights
Source§impl Debug for PriorityWeights
impl Debug for PriorityWeights
Source§impl Default for PriorityWeights
impl Default for PriorityWeights
impl Eq for PriorityWeights
Source§impl PartialEq for PriorityWeights
impl PartialEq for PriorityWeights
impl StructuralPartialEq for PriorityWeights
Auto Trait Implementations§
impl Freeze for PriorityWeights
impl RefUnwindSafe for PriorityWeights
impl Send for PriorityWeights
impl Sync for PriorityWeights
impl Unpin for PriorityWeights
impl UnsafeUnpin for PriorityWeights
impl UnwindSafe for PriorityWeights
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