pub trait MeshProvider: Send {
// Required methods
fn id(&self) -> &'static str;
fn start(&mut self, ctx: &ProviderContext) -> Result<(), MeshError>;
fn status(&self) -> ProviderStatus;
}Expand description
A discovery mechanism. Implementing this — and handing an instance to the manager — is the whole registration: no consumer, surface or registry learns provider names.
Required Methods§
Sourcefn id(&self) -> &'static str
fn id(&self) -> &'static str
The provider id, stable, snake_case: the word status listings and sighting provenance carry for this mechanism.
Sourcefn start(&mut self, ctx: &ProviderContext) -> Result<(), MeshError>
fn start(&mut self, ctx: &ProviderContext) -> Result<(), MeshError>
Start the provider’s threads. An Err marks this provider Failed and starts
the others regardless.
Sourcefn status(&self) -> ProviderStatus
fn status(&self) -> ProviderStatus
The current status: state, the reason or subject, and this provider’s counters.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".