pub trait ServiceProvider: Send + Sync {
// Required method
fn name(&self) -> &str;
// Provided method
fn is_healthy(&self) -> bool { ... }
}Expand description
A backend that an ApplicationService can select.
Implementors supply a stable name and optionally override
is_healthy to signal current usability.
Required Methods§
Provided Methods§
Sourcefn is_healthy(&self) -> bool
fn is_healthy(&self) -> bool
Whether the provider is currently usable. Defaults to true.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".