pub struct DeviceHealth {
pub consecutive_failures: u32,
pub total_operations: u64,
pub total_failures: u64,
pub last_error: Option<String>,
pub last_success_unix_ms: Option<u64>,
pub last_failure_unix_ms: Option<u64>,
}Expand description
Pollable health snapshot for a device address.
Fields§
§consecutive_failures: u32§total_operations: u64§total_failures: u64§last_error: Option<String>§last_success_unix_ms: Option<u64>§last_failure_unix_ms: Option<u64>Implementations§
Source§impl DeviceHealth
impl DeviceHealth
pub fn is_healthy(&self) -> bool
Trait Implementations§
Source§impl Clone for DeviceHealth
impl Clone for DeviceHealth
Source§impl Debug for DeviceHealth
impl Debug for DeviceHealth
Source§impl Default for DeviceHealth
impl Default for DeviceHealth
Source§impl<'de> Deserialize<'de> for DeviceHealth
impl<'de> Deserialize<'de> for DeviceHealth
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
impl Eq for DeviceHealth
Source§impl PartialEq for DeviceHealth
impl PartialEq for DeviceHealth
Source§impl Serialize for DeviceHealth
impl Serialize for DeviceHealth
impl StructuralPartialEq for DeviceHealth
Auto Trait Implementations§
impl Freeze for DeviceHealth
impl RefUnwindSafe for DeviceHealth
impl Send for DeviceHealth
impl Sync for DeviceHealth
impl Unpin for DeviceHealth
impl UnsafeUnpin for DeviceHealth
impl UnwindSafe for DeviceHealth
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.