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§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".