pub trait ProcessListener<I, O>: Send + Sync {
// Provided methods
fn before_process<'a>(
&'a self,
input: &'a I,
context: ItemListenerContext<'a>,
) -> BoxFuture<'a, Result<(), ListenerError>> { ... }
fn after_process<'a>(
&'a self,
input: &'a I,
output: Option<&'a O>,
context: ItemListenerContext<'a>,
) -> BoxFuture<'a, Result<(), ListenerError>> { ... }
fn on_process_error<'a>(
&'a self,
input: &'a I,
fault: FaultDescriptor,
context: ItemListenerContext<'a>,
) -> BoxFuture<'a, Result<(), ListenerError>> { ... }
}Expand description
Observes processor invocations for one item.
Provided Methods§
Sourcefn before_process<'a>(
&'a self,
input: &'a I,
context: ItemListenerContext<'a>,
) -> BoxFuture<'a, Result<(), ListenerError>>
fn before_process<'a>( &'a self, input: &'a I, context: ItemListenerContext<'a>, ) -> BoxFuture<'a, Result<(), ListenerError>>
Runs in registration order before the processor is invoked.
Sourcefn after_process<'a>(
&'a self,
input: &'a I,
output: Option<&'a O>,
context: ItemListenerContext<'a>,
) -> BoxFuture<'a, Result<(), ListenerError>>
fn after_process<'a>( &'a self, input: &'a I, output: Option<&'a O>, context: ItemListenerContext<'a>, ) -> BoxFuture<'a, Result<(), ListenerError>>
Runs in reverse registration order after the processor returns.
A filtered input has no output.
Sourcefn on_process_error<'a>(
&'a self,
input: &'a I,
fault: FaultDescriptor,
context: ItemListenerContext<'a>,
) -> BoxFuture<'a, Result<(), ListenerError>>
fn on_process_error<'a>( &'a self, input: &'a I, fault: FaultDescriptor, context: ItemListenerContext<'a>, ) -> BoxFuture<'a, Result<(), ListenerError>>
Runs in reverse registration order for every failed processor call.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".