pub enum RecoverableError {
NetworkError,
ServerUnavailable,
QuotaExceeded,
PacketIdExhausted,
FlowControlLimited,
SessionTakenOver,
ServerShuttingDown,
MqoqFlowRecoverable,
}Expand description
A transient fault for which retrying the same operation after a delay can succeed on its own, with no state change or user intervention.
This is the retry/backoff machinery’s notion of “recoverable”, not a general judgement about whether the failure is the caller’s fault. An error is recoverable here only if the fix is “wait, then try again”: the operation’s preconditions still hold and something outside the caller’s control is expected to clear. Faults whose remedy is a state transition (re-establishing a connection), a different request (smaller payload), or human action (fixing credentials) are deliberately not recoverable, because a naive backoff loop on them would spin forever.
Variants§
NetworkError
Transient network fault (timeout, reset, unreachable). Retry after backoff.
Server temporarily cannot serve the request. Retry after backoff.
QuotaExceeded
Server-side quota hit. Retry after a longer backoff (see base_delay_multiplier).
PacketIdExhausted
No packet identifiers currently free; one frees as in-flight messages ack.
FlowControlLimited
Receive-maximum flow-control limit reached; capacity returns as acks arrive.
SessionTakenOver
Session was taken over by another client using the same client id.
ServerShuttingDown
Server is shutting down; reconnect will land on a fresh instance.
MqoqFlowRecoverable
Recoverable MQoQ flow condition (idle/cancelled/refused flow).
Implementations§
Source§impl RecoverableError
impl RecoverableError
pub fn base_delay_multiplier(&self) -> u32
pub fn default_set() -> [Self; 6]
Trait Implementations§
Source§impl Clone for RecoverableError
impl Clone for RecoverableError
Source§fn clone(&self) -> RecoverableError
fn clone(&self) -> RecoverableError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more