Trait json_job_dispatch::Handler
source · pub trait Handler: HandlerCore {
// Required method
fn handle<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
kind: &'life1 str,
object: &'life2 Value,
retry_count: usize
) -> Pin<Box<dyn Future<Output = Result<JobResult, JobError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
}
Expand description
Interface for handling events asynchronously.
Required Methods§
sourcefn handle<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
kind: &'life1 str,
object: &'life2 Value,
retry_count: usize
) -> Pin<Box<dyn Future<Output = Result<JobResult, JobError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, kind: &'life1 str, object: &'life2 Value, retry_count: usize ) -> Pin<Box<dyn Future<Output = Result<JobResult, JobError>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,
The JSON object is passed in and acted upon.