Trait z4_engine::Task

source ·
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>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Timer tasks when game room started

Required Associated Types§

Required Methods§

source

fn timer(&self) -> u64

source

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>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Implementors§