pub struct PoolConfig {
pub max_connections: usize,
pub min_connections: usize,
pub connection_timeout: Option<Duration>,
pub idle_timeout: Option<Duration>,
pub max_lifetime: Option<Duration>,
pub statement_cache_size: usize,
}Expand description
Configuration for the connection pool.
Fields§
§max_connections: usizeMaximum number of connections in the pool.
min_connections: usizeMinimum number of connections to keep alive.
connection_timeout: Option<Duration>Maximum time to wait for a connection.
idle_timeout: Option<Duration>Maximum idle time before a connection is closed.
max_lifetime: Option<Duration>Maximum lifetime of a connection.
statement_cache_size: usizeSize of the prepared statement cache per connection.
Trait Implementations§
Source§impl Clone for PoolConfig
impl Clone for PoolConfig
Source§fn clone(&self) -> PoolConfig
fn clone(&self) -> PoolConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PoolConfig
impl Debug for PoolConfig
Auto Trait Implementations§
impl Freeze for PoolConfig
impl RefUnwindSafe for PoolConfig
impl Send for PoolConfig
impl Sync for PoolConfig
impl Unpin for PoolConfig
impl UnwindSafe for PoolConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more