pub struct HealthRecord {
pub timestamp: Instant,
pub health_score: f64,
pub metrics: HashMap<String, f64>,
pub status: NodeStatus,
}
Expand description
Health record
Fields§
§timestamp: Instant
Timestamp
health_score: f64
Health score (0.0.saturating_sub(1).0)
metrics: HashMap<String, f64>
Specific metrics
status: NodeStatus
Status
Trait Implementations§
Source§impl Clone for HealthRecord
impl Clone for HealthRecord
Source§fn clone(&self) -> HealthRecord
fn clone(&self) -> HealthRecord
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 HealthRecord
impl Debug for HealthRecord
Source§impl Default for HealthRecord
impl Default for HealthRecord
Source§impl<'de> Deserialize<'de> for HealthRecord
impl<'de> Deserialize<'de> for HealthRecord
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for HealthRecord
impl RefUnwindSafe for HealthRecord
impl Send for HealthRecord
impl Sync for HealthRecord
impl Unpin for HealthRecord
impl UnwindSafe for HealthRecord
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more