Trait pliantdb_jobs::Job[][src]

pub trait Job: Debug + Send + Sync + 'static {
    type Output: Clone + Serialize + for<'de> Deserialize<'de> + Send + Sync + 'static;
    fn execute<'life0, 'async_trait>(
        &'life0 mut self
    ) -> Pin<Box<dyn Future<Output = Result<Self::Output>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
; }
Expand description

Defines a background job that can be queued and executed.

Associated Types

The output type of the job.

Required methods

Executes the job and returns the result.

Implementors