#[non_exhaustive]pub enum LifecycleError {
Service(ServiceError),
HostIdentity(HostIdentityError),
NoHost,
Launch(Error),
LaunchTimeout,
RestartExhausted,
NotOwned,
Released,
StaleGeneration {
issued: u64,
current: u64,
},
Unconfirmed,
Process(Error),
}Expand description
Why a lifecycle operation failed.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Service(ServiceError)
A wire-level or discovery error (kept with its retryable flag).
HostIdentity(HostIdentityError)
The process behind the endpoint is not the host the caller expected. Nothing was sent to it, and nothing was attached.
NoHost
No live host, and no launcher to start one. Retryable.
Launch(Error)
The launcher failed, or the launched process left before it published itself.
LaunchTimeout
The launched process did not publish itself within the startup timeout (it was stopped).
RestartExhausted
The owned host exited and the restart budget is spent.
NotOwned
DaemonLifecycle::shutdown_owned on a host this lifecycle did not launch.
Released
The session or the lifecycle was already released or shut down.
StaleGeneration
The host the session was bound to is gone or was replaced. issued is the generation
epoch the session (or request) was bound to, current the epoch now. The request may or
may not have run on the old host.
Unconfirmed
The host generation could not be confirmed (its record was unreadable). Treated like stale: a reply that cannot be tied to the current host is not delivered.
Process(Error)
A process operation failed (identity read, signal).
Implementations§
Source§impl LifecycleError
impl LifecycleError
Sourcepub fn is_retryable(&self) -> bool
pub fn is_retryable(&self) -> bool
Whether trying again (a fresh acquire_session) can succeed. Never true for a stale
reply as such: the caller decides whether the request may run twice.
Sourcepub fn into_service_error(self) -> ServiceError
pub fn into_service_error(self) -> ServiceError
Collapse into the single wire-style error.
Trait Implementations§
Source§impl Debug for LifecycleError
impl Debug for LifecycleError
Source§impl Display for LifecycleError
impl Display for LifecycleError
Source§impl Error for LifecycleError
impl Error for LifecycleError
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()