pub enum WorkerError {
Connect {
source: Error,
},
Handshake {
source: Status,
},
Registration {
source: Box<dyn Error + Send + Sync + 'static>,
},
Decode {
source: Box<dyn Error + Send + Sync + 'static>,
},
Encode {
source: Box<dyn Error + Send + Sync + 'static>,
},
Transport {
source: Status,
},
CleanCloseExhausted,
}Expand description
Errors produced by worker configuration, protocol, transport, and payload boundaries.
Variants§
Connect
The worker could not connect to the configured endpoint.
Handshake
The worker could not perform the initial protocol handshake.
Registration
The worker could not register activity types.
Decode
A payload or wire value could not be decoded.
Encode
A payload or wire value could not be encoded.
Transport
An established worker transport failed.
CleanCloseExhausted
The server kept closing the worker stream cleanly until the cumulative session-drop budget ran out without any session proving healthy.
A single clean close is a retryable drop (the worker redials through
the budgeted backoff cycle); this error surfaces only when a
persistent clean-close loop exhausts reconnect.max_attempts.
Implementations§
Source§impl WorkerError
impl WorkerError
Sourcepub fn registration(source: impl Error + Send + Sync + 'static) -> Self
pub fn registration(source: impl Error + Send + Sync + 'static) -> Self
Creates a registration error from any source error.
Sourcepub fn grpc_status(&self) -> Option<&Status>
pub fn grpc_status(&self) -> Option<&Status>
Returns the underlying gRPC status carried by this error, if any.
Handshake and transport failures carry a tonic::Status directly;
registration failures preserve the status as their boxed source when the
server rejected the registration over the wire.
Sourcepub fn is_retryable(&self) -> bool
pub fn is_retryable(&self) -> bool
Returns whether retrying connection or registration can ever succeed.
PermissionDenied and Unauthenticated are deterministic server
denials (ungranted namespace, rejected credentials): retrying them only
burns the reconnect budget and delays the surfaced error. Every other
failure (transport unavailability, decode faults, local validation) is
treated as transient for the bounded backoff loop.
Trait Implementations§
Source§impl Debug for WorkerError
impl Debug for WorkerError
Source§impl Display for WorkerError
impl Display for WorkerError
Source§impl Error for WorkerError
impl Error for WorkerError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Auto Trait Implementations§
impl !RefUnwindSafe for WorkerError
impl !UnwindSafe for WorkerError
impl Freeze for WorkerError
impl Send for WorkerError
impl Sync for WorkerError
impl Unpin for WorkerError
impl UnsafeUnpin for WorkerError
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
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