Skip to main content

CronJob

Trait CronJob 

Source
pub(crate) trait CronJob:
    Send
    + Sync
    + 'static {
    // Required methods
    fn name(&self) -> &'static str;
    fn schedule(&self) -> &str;
    fn run<'life0, 'life1, 'async_trait>(
        &'life0 self,
        state: &'life1 ServerState,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}

Required Methods§

Source

fn name(&self) -> &'static str

Source

fn schedule(&self) -> &str

Source

fn run<'life0, 'life1, 'async_trait>( &'life0 self, state: &'life1 ServerState, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Implementors§