pub struct WorkerUnavailable {
pub reason: QueueServiceReason,
pub clock: Option<ExpiredClock>,
pub waited: Duration,
pub address: ServiceAddress,
pub census: PoolCensus,
}Expand description
A typed dispatch refusal: the taxonomy reason, which clock expired (if any), how long the dispatch waited, and the live poller census behind the verdict. Never a generic timeout, never a bare string.
Fields§
§reason: QueueServiceReasonTaxonomy state of the queue at refusal time.
clock: Option<ExpiredClock>The clock whose expiry produced the refusal, or None for a structural
refusal (which needs no clock).
waited: DurationHow long this dispatch waited before refusing.
address: ServiceAddressPool address that could not be served.
census: PoolCensusLive poller census at refusal time.
Implementations§
Sourcepub const fn is_retryable(&self) -> bool
pub const fn is_retryable(&self) -> bool
Whether the engine’s retry executor should treat this failure as retryable.
Structural unservability is terminal: no retry can conjure a deployment that declares the queue. Every other reason is a transient fleet condition (a worker may connect, backpressure may drain), so it carries the retryable prefix and the workflow’s own declared retry policy — or its absence — decides what happens next. No retry budget is invented here.
Sourcepub fn reason_string(&self) -> String
pub fn reason_string(&self) -> String
The failure string handed back at the engine dispatch seam.
Sourcepub fn parse(failure: &str) -> Option<UnavailableSummary>
pub fn parse(failure: &str) -> Option<UnavailableSummary>
Read the typed head back out of a dispatch failure string.
Returns None for any failure that is not a queue-service refusal, so
surfacing code can ask “is this a WorkerUnavailable?” without string
sniffing.
Trait Implementations§
Source§fn clone(&self) -> WorkerUnavailable
fn clone(&self) -> WorkerUnavailable
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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>
T in a tonic::Request