pub trait CompensationHandler:
Send
+ Sync
+ 'static {
// Required method
fn on_compensation(&self, event: CompensationEvent);
}Expand description
Application callback for compensation events.
The application registers a handler to decide how to react:
- Prompt the user (“username taken”)
- Auto-retry with a modified value
- Silently accept the rejection
Required Methods§
fn on_compensation(&self, event: CompensationEvent)
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl<F: Fn(CompensationEvent) + Send + Sync + 'static> CompensationHandler for F
Function-based compensation handler for convenience.