JobHandler

Trait JobHandler 

Source
pub trait JobHandler:
    Send
    + Sync
    + Default {
    type Arg: Message + Default;
    type Error: Into<Box<dyn Error + Send + Sync + 'static>> + Send + Sync;

    const NAME: &'static str;

    // Required method
    fn perform<'life0, 'async_trait>(
        &'life0 mut self,
        arg: Self::Arg,
    ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}

Required Associated Constants§

Source

const NAME: &'static str

Required Associated Types§

Source

type Arg: Message + Default

Source

type Error: Into<Box<dyn Error + Send + Sync + 'static>> + Send + Sync

Required Methods§

Source

fn perform<'life0, 'async_trait>( &'life0 mut self, arg: Self::Arg, ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

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§