CustomizeConnection

Trait CustomizeConnection 

Source
pub trait CustomizeConnection<C: Send + 'static, E: 'static>:
    Debug
    + Send
    + Sync
    + 'static {
    // Provided method
    fn on_acquire<'a>(
        &'a self,
        _connection: &'a mut C,
    ) -> Pin<Box<dyn Future<Output = Result<(), E>> + Send + 'a>> { ... }
}
Expand description

A trait which provides functionality to initialize a connection

Provided Methods§

Source

fn on_acquire<'a>( &'a self, _connection: &'a mut C, ) -> Pin<Box<dyn Future<Output = Result<(), E>> + Send + 'a>>

Called with connections immediately after they are returned from ManageConnection::connect.

The default implementation simply returns Ok(()). If this method returns an error, it will be forwarded to the configured error sink.

Implementors§