Trait 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.

Required Methods§

Source

fn quit(self: Box<Self>) -> Result<()>

Stopping a running task instance.

Implementations on Foreign Types§

Source§

impl DelayTaskHandler for ()

Source§

fn quit(self: Box<Self>) -> Result<()>

Implementors§