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