pub struct Config { /* private fields */ }
Expand description
Configuration for the connection pool
Implementations§
source§impl Config
impl Config
sourcepub fn connection_timeout(self, timeout: Duration) -> Self
pub fn connection_timeout(self, timeout: Duration) -> Self
Set timeout period for starting up a new connection. If it takes longer than the specified time to wait for a connection to become available, it will fail.
By default, there is no timeout limit on getting a new connection.
sourcepub fn test_on_check_out(self, test_on_check_out: bool) -> Self
pub fn test_on_check_out(self, test_on_check_out: bool) -> Self
If true, the health of a connection will be verified via a call to
ConnectionManager::is_valid
before it is checked out of the pool.
Defaults to true.