#[non_exhaustive]pub enum HealthStatus {
Healthy,
Degraded(String),
Unhealthy(String),
}Expand description
Health of a single Resource, as reported by Resource::health.
Returned per-resource by Resources::check_all_health and folded into a
single worst-case value by Resources::aggregate_health. Health checks
are opt-in observability — the engine never calls Resource::health
during normal workflow execution.
This enum is #[non_exhaustive]; match it with a wildcard arm.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Healthy
The resource is fully operational.
Degraded(String)
The resource is still usable but impaired (e.g. a degraded replica, partial connectivity, elevated latency). The string explains why.
Unhealthy(String)
The resource is not usable. The string explains why.
Implementations§
Source§impl HealthStatus
impl HealthStatus
Sourcepub fn is_healthy(&self) -> bool
pub fn is_healthy(&self) -> bool
Returns true only for HealthStatus::Healthy.
Trait Implementations§
Source§impl Clone for HealthStatus
impl Clone for HealthStatus
Source§fn clone(&self) -> HealthStatus
fn clone(&self) -> HealthStatus
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 HealthStatus
impl Debug for HealthStatus
impl Eq for HealthStatus
Source§impl PartialEq for HealthStatus
impl PartialEq for HealthStatus
Source§fn eq(&self, other: &HealthStatus) -> bool
fn eq(&self, other: &HealthStatus) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for HealthStatus
Auto Trait Implementations§
impl Freeze for HealthStatus
impl RefUnwindSafe for HealthStatus
impl Send for HealthStatus
impl Sync for HealthStatus
impl Unpin for HealthStatus
impl UnsafeUnpin for HealthStatus
impl UnwindSafe for HealthStatus
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