Struct Priority
pub struct Priority {
pub level: i32,
pub fairness_key: String,
pub fairness_weight: u32,
}Expand description
Where a step waiting for a permit stands. The default (level 0, no key, weight 1) is plain arrival order.
Fields§
§level: i32Higher levels are served first. A lower level waits while any higher one has waiters.
fairness_key: StringWaiters at one level are grouped by this key (a tenant ID, say) and the groups take turns. Empty: the shared group of unkeyed waiters.
fairness_weight: u32Permits the key takes in each turn; 0 counts as 1. The latest waiter of a key sets its weight.
Implementations§
§impl Priority
impl Priority
pub fn is_default(&self) -> bool
Trait Implementations§
§impl<'de> Deserialize<'de> for Priority
impl<'de> Deserialize<'de> for Priority
§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 Priority
impl StructuralPartialEq for Priority
Auto Trait Implementations§
impl Freeze for Priority
impl RefUnwindSafe for Priority
impl Send for Priority
impl Sync for Priority
impl Unpin for Priority
impl UnsafeUnpin for Priority
impl UnwindSafe for Priority
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