pub struct NodePriorityEntry {
pub node_id: PriorityNodeId,
pub class: PriorityClass,
pub boost: i32,
pub effective: i32,
pub label: String,
}Expand description
Describes the priority assignment for a single node.
Fields§
§node_id: PriorityNodeIdThe node identifier.
class: PriorityClassThe base priority class.
boost: i32An additional boost or penalty (-500 to +500).
effective: i32Computed effective priority (class weight + boost).
label: StringOptional label for debugging.
Implementations§
Source§impl NodePriorityEntry
impl NodePriorityEntry
Sourcepub fn new(node_id: PriorityNodeId, class: PriorityClass, label: &str) -> Self
pub fn new(node_id: PriorityNodeId, class: PriorityClass, label: &str) -> Self
Create a new priority entry.
Sourcepub fn with_boost(self, boost: i32) -> Self
pub fn with_boost(self, boost: i32) -> Self
Apply a priority boost (positive) or penalty (negative).
Sourcepub fn recalculate(&mut self)
pub fn recalculate(&mut self)
Recalculate effective priority after changes.
Trait Implementations§
Source§impl Clone for NodePriorityEntry
impl Clone for NodePriorityEntry
Source§fn clone(&self) -> NodePriorityEntry
fn clone(&self) -> NodePriorityEntry
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 NodePriorityEntry
impl Debug for NodePriorityEntry
Auto Trait Implementations§
impl Freeze for NodePriorityEntry
impl RefUnwindSafe for NodePriorityEntry
impl Send for NodePriorityEntry
impl Sync for NodePriorityEntry
impl Unpin for NodePriorityEntry
impl UnsafeUnpin for NodePriorityEntry
impl UnwindSafe for NodePriorityEntry
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more