Trait delay_timer::prelude::DelayTaskHandler
source · pub trait DelayTaskHandler: Send + Sync {
// Required method
fn quit(self: Box<Self>) -> Result<()>;
}
Expand description
You can implement this trait for your type T
,
and then you can define the function that returns the Box<T> as Box<dyn DelayTaskHandler>
closure,
which can be wrapped by the TaskBuilder and then thrown into the time wheel for constant rotation.