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

A trait which provides functionality to initialize a connection

Provided Methods§

source

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

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§