pub trait AddHealthCheckServiceExt {
// Required methods
fn add_health_check_service<T>(&mut self) -> &mut Self
where T: Service<Handle = Arc<T>> + HealthCheck + 'static;
fn has_health_check_service<T>(&self) -> bool
where T: Service<Handle = Arc<T>> + HealthCheck + 'static;
}Expand description
Registers health checks resolved from the dependency-injection container.
The check type T is a Service, built by the container and registered as
a HealthCheck. The service is added automatically if not already present.
Required Methods§
Sourcefn add_health_check_service<T>(&mut self) -> &mut Self
fn add_health_check_service<T>(&mut self) -> &mut Self
Registers the Service T as a health check on the control server.
§Panics
Panics if T is already registered as a health-check service. Building
the App additionally panics if T is registered both as a service
and as an instance via AddHealthCheckExt::add_health_check.
Sourcefn has_health_check_service<T>(&self) -> bool
fn has_health_check_service<T>(&self) -> bool
Returns whether T is registered as a health-check service.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".