pub trait SQLMessageHandler<M>: Debug + Send + Syncwhere
M: Send + Sync,{
fn new(config: &SQLHandlerConfig) -> Self
where
Self: Sized;
fn process<'life0, 'async_trait>(
&'life0 mut self,
msg: M
) -> Pin<Box<dyn Future<Output = M> + Send + 'async_trait>>
where
M: SQLMessage + 'async_trait,
'life0: 'async_trait,
Self: '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
.
Required Methods
sourcefn new(config: &SQLHandlerConfig) -> Selfwhere