Trait SQLMessageHandler

Source
pub trait SQLMessageHandler<M>:
    Debug
    + Send
    + Sync
where M: 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 SQLMessages.

The default implementation is simply a passthrough. An SQLMessageHandler is of value when it applies a transformation to the processed SQLMessage.

Required Methods§

Source

fn new(config: &SQLHandlerConfig) -> Self
where Self: Sized,

Provided Methods§

Source

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,

Applies a transformation to an SQLMessage.

Implementors§