pub type AfterConnectHook = Arc<dyn Fn(&AsyncConnection) -> HookFuture<'_> + Send + Sync + 'static>;Expand description
A hook that runs once on every newly-opened connection (after authentication and any database-creation handshake). Use it to set session variables, install statement caches, warm prepared statements, etc.
Returning Err from the hook causes pool creation to fail and the connection
to be dropped.
Aliased Typeยง
pub struct AfterConnectHook { /* private fields */ }