pub trait TaskService: Service {
// Required method
fn run_task(&mut self) -> LocalBoxFuture<'_, Result<(), String>>;
}
Expand description
Implement this trait if your service needs to run a task in the background.
The implementation here does not need to be Send
as we only run the
task on a single thread executor.