pub struct HealthChecks(/* private fields */);Expand description
The checks in force at one scope, and the report they produce together.
One of these per scope rather than one per process: a session’s health and the whole daemon’s are different questions with different lifetimes, and a single shared registry would either grow a check per session forever or answer the wrong one of the two.
Implementations§
Source§impl HealthChecks
impl HealthChecks
pub fn new() -> Self
pub fn with(self, check: Arc<dyn HealthCheck>) -> Self
pub fn from_vec(checks: Vec<Arc<dyn HealthCheck>>) -> Self
pub fn is_empty(&self) -> bool
pub fn checks(&self) -> &[Arc<dyn HealthCheck>]
Sourcepub fn report(&self) -> HealthReport
pub fn report(&self) -> HealthReport
Run every check. An empty set is HealthStatus::Ok — nothing has
said otherwise, which is all any report ever claims.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for HealthChecks
impl !UnwindSafe for HealthChecks
impl Forget for HealthChecks
impl Freeze for HealthChecks
impl Move for HealthChecks
impl Send for HealthChecks
impl Sync for HealthChecks
impl Unpin for HealthChecks
impl UnsafeUnpin for HealthChecks
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