Trait TaskHandler

Source
pub trait TaskHandler:
    Serialize
    + for<'de> Deserialize<'de>
    + Send
    + Sync
    + 'static {
    const IDENTIFIER: &'static str;

    // Required method
    fn run(
        self,
        ctx: WorkerContext,
    ) -> impl Future<Output = impl IntoTaskHandlerResult> + Send + 'static;
}

Required Associated Constants§

Source

const IDENTIFIER: &'static str

Required Methods§

Source

fn run( self, ctx: WorkerContext, ) -> impl Future<Output = impl IntoTaskHandlerResult> + Send + 'static

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§