#[non_exhaustive]pub enum HealthStatus {
NotReady,
Ready,
Affected,
ShuttingDown,
ShutDown,
Panicked,
}Expand description
Health status returned as a part of Health.
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.
NotReady
Component is initializing and is not ready yet.
Ready
Component is ready for operations.
Affected
Component is affected by some non-fatal issue. The component is still considered healthy.
ShuttingDown
Component has received a termination request and is in the process of shutting down.
Components that shut down instantly may skip this status and proceed directly to Self::ShutDown.
ShutDown
Component is shut down.
Panicked
Component has been abnormally interrupted by a panic.
Implementations§
Source§impl HealthStatus
impl HealthStatus
Sourcepub fn is_healthy(self) -> bool
pub fn is_healthy(self) -> bool
Checks whether a component is healthy according to this status.
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 · 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
Source§impl From<HealthStatus> for Health
impl From<HealthStatus> for Health
Source§fn from(status: HealthStatus) -> Self
fn from(status: HealthStatus) -> Self
Converts to this type from the input type.
Source§impl PartialEq for HealthStatus
impl PartialEq for HealthStatus
Source§impl Serialize for HealthStatus
impl Serialize for HealthStatus
impl Copy for HealthStatus
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