Skip to main content

MeshProvider

Trait MeshProvider 

Source
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§

Source

fn id(&self) -> &'static str

The provider id, stable, snake_case: the word status listings and sighting provenance carry for this mechanism.

Source

fn start(&mut self, ctx: &ProviderContext) -> Result<(), MeshError>

Start the provider’s threads. An Err marks this provider Failed and starts the others regardless.

Source

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".

Implementors§