pub trait TaskHandler: Send + Sync {
// Required methods
fn task_type(&self) -> &str;
fn execute(&self, ctx: &TaskContext, payload: &[u8]) -> Result<TaskEvent>;
// Provided method
fn validate(&self, _payload: &[u8]) -> Result<()> { ... }
}Expand description
Trait implemented by task handlers.
Task handlers execute scheduled tasks and produce events that are written to the canonical event log.