pub enum WarmSwapError {
NotWarm(Compatibility),
Admission(String),
Drain(String),
Lease {
op: &'static str,
reason: String,
},
Stage(StageError),
Resume(String),
ResumeMismatch {
resumed_from: String,
expected: String,
},
}Expand description
Why a warm swap was refused or could not complete.
Variants§
NotWarm(Compatibility)
The release did not classify Compatibility::Warm, so it does not take
the click-to-restart path. A hot change reloads with no restart, a cold
change needs a coordinated redeploy, and an incompatible bundle was built
for a runtime this binary cannot satisfy.
Admission(String)
Admission could not be closed, so new turns cannot be reliably stopped and the swap is abandoned before the lease is touched.
Drain(String)
The drain could not reach a committed checkpoint, so the swap is abandoned with the lease still held — nothing was released or swapped.
Lease
A lease operation failed — either releasing the lease before the swap or re-acquiring it after.
Fields
Stage(StageError)
The stager could not verify or apply the binary swap. Wraps the underlying
StageError — most importantly StageError::Unverified, which means
the new binary’s signature did not verify and nothing was swapped.
Resume(String)
Resume could not restart the conversation from the checkpoint after the swap. The lease has already been re-acquired, so this is a resume failure on a live binary, not a lost lease.
ResumeMismatch
Resume restarted from a different turn than the one drained — a dropped or
duplicated turn. Named separately from Self::Resume because it is a
correctness violation, not a transport failure.
Trait Implementations§
Source§impl Debug for WarmSwapError
impl Debug for WarmSwapError
Source§impl Display for WarmSwapError
impl Display for WarmSwapError
Source§impl Error for WarmSwapError
impl Error for WarmSwapError
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()
Source§impl From<StageError> for WarmSwapError
impl From<StageError> for WarmSwapError
Source§fn from(source: StageError) -> Self
fn from(source: StageError) -> Self
Auto Trait Implementations§
impl Freeze for WarmSwapError
impl RefUnwindSafe for WarmSwapError
impl Send for WarmSwapError
impl Sync for WarmSwapError
impl Unpin for WarmSwapError
impl UnsafeUnpin for WarmSwapError
impl UnwindSafe for WarmSwapError
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> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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