pub enum DetectorHealth {
Unchecked,
Available {
since: Timestamp,
},
Unavailable {
since: Timestamp,
},
}Expand description
The failure detector’s health, and since when it has been so.
Three states and no fourth: a detector nobody has checked has no “since”,
and one that was checked always has one. On the wire it is the object the
status and context reads answer — status, and since that is null
exactly when the status is unchecked — and an object pairing them any
other way is refused rather than read.
Variants§
Unchecked
Nothing checks it: no detector health address is configured, or no check has been made yet.
Available
It answered its health check, from this instant on.
It did not, from this instant on.
Implementations§
Source§impl DetectorHealth
impl DetectorHealth
Sourcepub const fn status(&self) -> DetectorHealthStatus
pub const fn status(&self) -> DetectorHealthStatus
What the last check found.
Trait Implementations§
Source§impl Clone for DetectorHealth
impl Clone for DetectorHealth
impl Copy for DetectorHealth
Source§impl Debug for DetectorHealth
impl Debug for DetectorHealth
Source§impl Default for DetectorHealth
impl Default for DetectorHealth
Source§impl<'de> Deserialize<'de> for DetectorHealth
impl<'de> Deserialize<'de> for DetectorHealth
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
impl Eq for DetectorHealth
Source§impl JsonSchema for DetectorHealth
The schema describes the three states as arms tagged by status, so a
generated client cannot pair a status with the wrong since either.
impl JsonSchema for DetectorHealth
The schema describes the three states as arms tagged by status, so a
generated client cannot pair a status with the wrong since either.
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for DetectorHealth
impl PartialEq for DetectorHealth
Source§impl Sample for DetectorHealth
impl Sample for DetectorHealth
Source§fn sample_full() -> Self
fn sample_full() -> Self
A value carrying every field the type declares.
Source§fn sample_minimal() -> Self
fn sample_minimal() -> Self
A value carrying every optional field absent.
Source§fn sample_alternates() -> Vec<Self>
fn sample_alternates() -> Vec<Self>
One value per further arm, for a type whose wire form is a union. Read more
Source§impl Serialize for DetectorHealth
impl Serialize for DetectorHealth
impl StructuralPartialEq for DetectorHealth
Auto Trait Implementations§
impl Forget for DetectorHealth
impl Freeze for DetectorHealth
impl RefUnwindSafe for DetectorHealth
impl Send for DetectorHealth
impl Sync for DetectorHealth
impl Unpin for DetectorHealth
impl UnsafeUnpin for DetectorHealth
impl UnwindSafe for DetectorHealth
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