pub trait SQLMessageHandler<M>:
Debug
+ Send
+ Sync{
// Required method
fn new(config: &SQLHandlerConfig) -> Self
where Self: Sized;
// Provided method
fn process<'life0, 'async_trait>(
&'life0 mut self,
msg: M,
) -> Pin<Box<dyn Future<Output = M> + Send + 'async_trait>>
where M: SQLMessage + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait { ... }
}
Expand description
A trait defining an interface for handling SQLMessage
s.
The default implementation is simply a passthrough. An SQLMessageHandler
is of value when it applies a transformation to the processed SQLMessage
.