pub trait Worker<D: DataDeliveryPolicy + Clone + Send + Sync + 'static, V: Send>: Send + Sync {
// Required method
fn run(&mut self, context: &Context<D, V>) -> WResult;
}Expand description
The trait which MUST be implemented by all workers
Required Methods§
Sourcefn run(&mut self, context: &Context<D, V>) -> WResult
fn run(&mut self, context: &Context<D, V>) -> WResult
The worker’s main function, started by Controller::spawn_worker(). If the function
returns an error, the process is terminated using critical().