pub trait Task: Send + Sync {
type H: Handler;
// Required methods
fn timer(&self) -> u64;
fn run<'life0, 'life1, 'async_trait>(
&'life0 mut self,
state: &'life1 mut Self::H,
) -> Pin<Box<dyn Future<Output = Result<HandleResult<<Self::H as Handler>::Param>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
}
Expand description
Export useful types Timer tasks when game room started