Trait json_job_dispatch::Handler[][src]

pub trait Handler {
    fn add_to_director<'a>(&'a self, director: &mut Director<'a>) -> Result<()>;
fn handle(&self, kind: &str, object: &Value) -> Result<HandlerResult>; fn retry_limit(&self, _kind: &str) -> usize { ... }
fn handle_retry(
        &self,
        kind: &str,
        object: &Value,
        reasons: Vec<String>
    ) -> Result<HandlerResult> { ... } }

Interface for handling events.

Required Methods

Adds the handler to a director.

The JSON object is passed in and acted upon.

Provided Methods

The retry limit for a job kind.

The JSON object which has been retried is passed in and acted upon.

Implementors