[−][src]Trait health::Checkable
A resource whose health can be checked
Associated Types
Loading content...Required methods
#[must_use]fn check<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
The action run to check the current health of the element
Ok(())
is interpreted as a passing result. Any Err(_)
is interpreted as a failure.
fn name(&self) -> Cow<'_, str>
An identifier for the resource
Implementors
impl<F, E> Checkable for FnCheck<F> where
F: Fn() -> Result<(), E> + Send + Sync + 'static,
E: StdError + Send + Sync + 'static,
[src]
F: Fn() -> Result<(), E> + Send + Sync + 'static,
E: StdError + Send + Sync + 'static,
type Error = E
fn check<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<(), E>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<(), E>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn name(&self) -> Cow<'_, str>
[src]
impl<F, X, E> Checkable for FutureCheck<F> where
F: Fn() -> X + Send + Sync + 'static,
X: Future<Output = Result<(), E>> + Send + Sync + 'static,
E: StdError + Send + Sync + 'static,
[src]
F: Fn() -> X + Send + Sync + 'static,
X: Future<Output = Result<(), E>> + Send + Sync + 'static,
E: StdError + Send + Sync + 'static,