pub trait JobExecutionListener: Send + Sync {
// Required methods
fn before_job<'a>(
&'a self,
context: ListenerContext<'a>,
) -> BoxFuture<'a, Result<(), ListenerError>>;
fn after_job<'a>(
&'a self,
context: ListenerContext<'a>,
outcome: TaskletExecutionOutcome,
) -> BoxFuture<'a, Result<(), ListenerError>>;
}Expand description
A dynamically dispatched job lifecycle listener.
Required Methods§
Sourcefn before_job<'a>(
&'a self,
context: ListenerContext<'a>,
) -> BoxFuture<'a, Result<(), ListenerError>>
fn before_job<'a>( &'a self, context: ListenerContext<'a>, ) -> BoxFuture<'a, Result<(), ListenerError>>
Runs before the job becomes STARTED.
Sourcefn after_job<'a>(
&'a self,
context: ListenerContext<'a>,
outcome: TaskletExecutionOutcome,
) -> BoxFuture<'a, Result<(), ListenerError>>
fn after_job<'a>( &'a self, context: ListenerContext<'a>, outcome: TaskletExecutionOutcome, ) -> BoxFuture<'a, Result<(), ListenerError>>
Runs after the nested step has a provisional outcome and before the job receives its final status.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".