Worker

Trait Worker 

Source
pub trait Worker:
    Send
    + Sync
    + 'static {
    // Required methods
    fn run<'life0, 'async_trait>(
        &'life0 self,
        ctx: WorkerContext,
    ) -> Pin<Box<dyn Future<Output = WorkerResult> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn exported_functions(&self) -> &[FunctionMetadata];
}

Required Methods§

Source

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

Source

fn exported_functions(&self) -> &[FunctionMetadata]

Implementors§