pub trait ExecutionMonitor: Send + Sync {
// Provided methods
fn pre_execute(&self, _task: TaskId, _at: Instant) { ... }
fn post_execute(
&self,
_task: TaskId,
_at: Instant,
_took: Duration,
_ok: bool,
) { ... }
}Expand description
Hook invoked before and after every execute call. Defaults are no-ops.
Provided Methods§
Sourcefn pre_execute(&self, _task: TaskId, _at: Instant)
fn pre_execute(&self, _task: TaskId, _at: Instant)
Called immediately before an item’s execute() is invoked.