pub struct ServiceLifecycleSnapshot {
pub service_name: String,
pub phase: ServicePhase,
pub start_count: u32,
pub total_failures: u32,
pub last_error: Option<String>,
pub cumulative_running_secs: f64,
pub age_secs: f64,
pub time_in_phase_secs: f64,
pub termination_reason: Option<String>,
}Expand description
Point-in-time snapshot of a service’s lifecycle, suitable for
serialization (e.g., for a /health JSON endpoint).
Fields§
§service_name: StringService name.
phase: ServicePhaseLifecycle phase at snapshot time.
start_count: u32Total start attempts to date.
total_failures: u32Total failures to date.
last_error: Option<String>Last recorded error message, if any.
cumulative_running_secs: f64Cumulative wall-clock time in Running.
age_secs: f64How long since the service was first created.
time_in_phase_secs: f64How long since entering the current phase.
termination_reason: Option<String>Termination reason as a human string, if phase == Terminated.
Trait Implementations§
Source§impl Clone for ServiceLifecycleSnapshot
impl Clone for ServiceLifecycleSnapshot
Source§fn clone(&self) -> ServiceLifecycleSnapshot
fn clone(&self) -> ServiceLifecycleSnapshot
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ServiceLifecycleSnapshot
impl Debug for ServiceLifecycleSnapshot
Source§impl<'de> Deserialize<'de> for ServiceLifecycleSnapshot
impl<'de> Deserialize<'de> for ServiceLifecycleSnapshot
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ServiceLifecycleSnapshot, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ServiceLifecycleSnapshot, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<&ServiceLifecycle> for ServiceLifecycleSnapshot
impl From<&ServiceLifecycle> for ServiceLifecycleSnapshot
Source§fn from(lc: &ServiceLifecycle) -> ServiceLifecycleSnapshot
fn from(lc: &ServiceLifecycle) -> ServiceLifecycleSnapshot
Converts to this type from the input type.
Source§impl Serialize for ServiceLifecycleSnapshot
impl Serialize for ServiceLifecycleSnapshot
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for ServiceLifecycleSnapshot
impl RefUnwindSafe for ServiceLifecycleSnapshot
impl Send for ServiceLifecycleSnapshot
impl Sync for ServiceLifecycleSnapshot
impl Unpin for ServiceLifecycleSnapshot
impl UnsafeUnpin for ServiceLifecycleSnapshot
impl UnwindSafe for ServiceLifecycleSnapshot
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
Mutably borrows from an owned value. Read more