Trait bb8::CustomizeConnection [−][src]
pub trait CustomizeConnection<C: Send + 'static, E: 'static>: Debug + Send + Sync + 'static { fn on_acquire<'life0, 'life1, 'async_trait>(
&'life0 self,
_connection: &'life1 mut C
) -> Pin<Box<dyn Future<Output = Result<(), E>> + Send + 'async_trait>>
where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait, { ... } }
Expand description
A trait which provides functionality to initialize a connection
Provided methods
fn on_acquire<'life0, 'life1, 'async_trait>(
&'life0 self,
_connection: &'life1 mut C
) -> Pin<Box<dyn Future<Output = Result<(), E>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn on_acquire<'life0, 'life1, 'async_trait>(
&'life0 self,
_connection: &'life1 mut C
) -> Pin<Box<dyn Future<Output = Result<(), E>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: '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.