pub struct PingState {
pub status: HashMap<String, PingStatus>,
pub last_checked: HashMap<String, Instant>,
pub has_pinged: bool,
pub generation: u64,
pub slow_threshold_ms: u16,
pub auto_ping: bool,
pub filter_down_only: bool,
pub checked_at: Option<Instant>,
}Expand description
Ping/health-check state for all hosts.
Fields§
§status: HashMap<String, PingStatus>§last_checked: HashMap<String, Instant>§has_pinged: bool§generation: u64§slow_threshold_ms: u16§auto_ping: bool§filter_down_only: bool§checked_at: Option<Instant>Implementations§
Source§impl PingState
impl PingState
Sourcepub fn from_preferences() -> Self
pub fn from_preferences() -> Self
Construct with slow threshold + auto-ping loaded from preferences.
Sourcepub fn clear_results(&mut self)
pub fn clear_results(&mut self)
Clear all ping results and reset the dynamic filter/timestamp state.
Preserves config (slow_threshold_ms, auto_ping) and has_pinged.
Bumps generation so in-flight ping responses can be discarded.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PingState
impl RefUnwindSafe for PingState
impl Send for PingState
impl Sync for PingState
impl Unpin for PingState
impl UnsafeUnpin for PingState
impl UnwindSafe for PingState
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> 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