pub struct PriorityConfig { /* private fields */ }Expand description
Configuration for priority-based queue strategies.
Implementations§
Source§impl PriorityConfig
impl PriorityConfig
Sourcepub fn default_strategy(self, strategy: QueueStrategy) -> Self
pub fn default_strategy(self, strategy: QueueStrategy) -> Self
Set the default queue strategy for all priorities not matched by other rules.
Sourcepub fn exact(self, priority: isize, strategy: QueueStrategy) -> Self
pub fn exact(self, priority: isize, strategy: QueueStrategy) -> Self
Set the queue strategy for an exact priority value.
Sourcepub fn greater_or_equal(self, threshold: isize, strategy: QueueStrategy) -> Self
pub fn greater_or_equal(self, threshold: isize, strategy: QueueStrategy) -> Self
Set the queue strategy for priorities greater than or equal to the threshold. This is a convenience method that creates a range [threshold, isize::MAX].
Sourcepub fn greater_than(self, threshold: isize, strategy: QueueStrategy) -> Self
pub fn greater_than(self, threshold: isize, strategy: QueueStrategy) -> Self
Set the queue strategy for priorities greater than the threshold (exclusive). This is a convenience method that creates a range [threshold + 1, isize::MAX].
Sourcepub fn less_or_equal(self, threshold: isize, strategy: QueueStrategy) -> Self
pub fn less_or_equal(self, threshold: isize, strategy: QueueStrategy) -> Self
Set the queue strategy for priorities less than or equal to the threshold. This is a convenience method that creates a range [isize::MIN, threshold].
Sourcepub fn less_than(self, threshold: isize, strategy: QueueStrategy) -> Self
pub fn less_than(self, threshold: isize, strategy: QueueStrategy) -> Self
Set the queue strategy for priorities less than the threshold (exclusive). This is a convenience method that creates a range [isize::MIN, threshold - 1].
Sourcepub fn range(self, min: isize, max: isize, strategy: QueueStrategy) -> Self
pub fn range(self, min: isize, max: isize, strategy: QueueStrategy) -> Self
Set the queue strategy for priorities within a range [min, max] (inclusive).
Sourcepub fn strategy_for_priority(&self, priority: isize) -> QueueStrategy
pub fn strategy_for_priority(&self, priority: isize) -> QueueStrategy
Get the queue strategy for a specific priority.
Trait Implementations§
Source§impl Clone for PriorityConfig
impl Clone for PriorityConfig
Source§fn clone(&self) -> PriorityConfig
fn clone(&self) -> PriorityConfig
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
source. Read more