pub struct LeanWorkerLifecycleSnapshot {
pub worker_generation: u64,
pub restarts: u64,
pub exits: u64,
pub last_restart_reason: Option<LeanWorkerRestartReason>,
pub last_exit: Option<LeanWorkerExit>,
pub last_rss_kib: Option<u64>,
pub rss_samples_unavailable: u64,
}Expand description
Compact lifecycle facts for callers that supervise a worker boundary.
LeanWorkerStats remains the detailed counter set. This snapshot is the
stable, policy-facing view: a caller can compare two snapshots to observe
every restart performed inside the supervisor, including restarts caused by
timeout, cancellation, RSS limits, import/request cycling, or explicit
cycles.
Fields§
§worker_generation: u64Monotone generation number for the current child. It equals the total restart count observed by this supervisor.
restarts: u64Total restarts performed by the supervisor.
exits: u64Child exits observed by the supervisor, including policy cycles.
last_restart_reason: Option<LeanWorkerRestartReason>Most recent restart reason, if any.
last_exit: Option<LeanWorkerExit>Most recent child exit observed by the supervisor, if any.
last_rss_kib: Option<u64>Last measured child RSS in KiB, when available.
RSS checks skipped because the platform did not provide a usable sample.
Trait Implementations§
Source§impl Clone for LeanWorkerLifecycleSnapshot
impl Clone for LeanWorkerLifecycleSnapshot
Source§fn clone(&self) -> LeanWorkerLifecycleSnapshot
fn clone(&self) -> LeanWorkerLifecycleSnapshot
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for LeanWorkerLifecycleSnapshot
impl Debug for LeanWorkerLifecycleSnapshot
impl Eq for LeanWorkerLifecycleSnapshot
Source§impl PartialEq for LeanWorkerLifecycleSnapshot
impl PartialEq for LeanWorkerLifecycleSnapshot
Source§fn eq(&self, other: &LeanWorkerLifecycleSnapshot) -> bool
fn eq(&self, other: &LeanWorkerLifecycleSnapshot) -> bool
self and other values to be equal, and is used by ==.