pub struct PriorityItem<T> {
pub item: T,
pub priority: Priority,
pub enqueued_at: Instant,
pub effective_priority: AtomicU8,
}Expand description
A wrapped item with priority metadata.
effective_priority starts equal to the assigned priority level and is
decremented (promoted) by the aging pass when the item waits too long.
Fields§
§item: TThe payload.
priority: PriorityThe priority assigned at enqueue time.
enqueued_at: InstantWall-clock instant when the item was enqueued.
effective_priority: AtomicU8Current effective priority, decremented on each aging promotion. Stored as a raw index (0 = Critical … 4 = Background).
Implementations§
Auto Trait Implementations§
impl<T> !Freeze for PriorityItem<T>
impl<T> RefUnwindSafe for PriorityItem<T>where
T: RefUnwindSafe,
impl<T> Send for PriorityItem<T>where
T: Send,
impl<T> Sync for PriorityItem<T>where
T: Sync,
impl<T> Unpin for PriorityItem<T>where
T: Unpin,
impl<T> UnsafeUnpin for PriorityItem<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for PriorityItem<T>where
T: UnwindSafe,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request