Trait mesh_worker::WorkerFactory

source ·
pub trait WorkerFactory:
    'static
    + Send
    + Sync {
    // Required method
    fn builder(&self, name: &str) -> Result<WorkerBuilder>;
}
Expand description

Trait implemented by a type that can dispatch requests to a worker.

This trait is generally not used directly. Instead, use either RegisteredWorkers, or generate a factory type with the crate::runnable_workers! macro.

Required Methods§

source

fn builder(&self, name: &str) -> Result<WorkerBuilder>

Returns a builder for the worker with the given name.

Implementors§