pub trait Worker {
// Required method
fn run(&mut self) -> impl Future<Output = ()> + Send;
}Expand description
Trait representing a generic worker.
The worker runs an async looping function running periodic tasks.
This trait can be used to provide wrapper around a worker.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.