pub struct NodeHealth {
pub status: HealthStatus,
pub consecutive_failures: u32,
pub consecutive_successes: u32,
pub last_failure: Option<Instant>,
pub last_success: Option<Instant>,
}Expand description
Mutable runtime health counters for a single node.
Fields§
§status: HealthStatusCurrent health state.
consecutive_failures: u32Number of failures in a row since the last success (reset on success).
consecutive_successes: u32Number of successes in a row since the last failure (reset on failure).
last_failure: Option<Instant>When the most recent failure occurred, if ever.
last_success: Option<Instant>When the most recent success occurred, if ever.
Trait Implementations§
Source§impl Clone for NodeHealth
impl Clone for NodeHealth
Source§fn clone(&self) -> NodeHealth
fn clone(&self) -> NodeHealth
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 NodeHealth
impl Debug for NodeHealth
Auto Trait Implementations§
impl Freeze for NodeHealth
impl RefUnwindSafe for NodeHealth
impl Send for NodeHealth
impl Sync for NodeHealth
impl Unpin for NodeHealth
impl UnsafeUnpin for NodeHealth
impl UnwindSafe for NodeHealth
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