#[non_exhaustive]pub struct ConnectionPoolOptions {
pub max_idle_time: Option<Duration>,
pub max_pool_size: Option<u32>,
pub min_pool_size: Option<u32>,
}
Expand description
Contains the options for creating a connection pool. While these options are specified at the
client-level, ConnectionPoolOptions
is exposed for the purpose of CMAP event handling.
Fields (Non-exhaustive)
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.max_idle_time: Option<Duration>
Connections that have been ready for usage in the pool for longer than max_idle_time
will
not be used.
The default is that connections will not be closed due to being idle.
max_pool_size: Option<u32>
The maximum number of connections that the pool can have at a given time. This includes connections which are currently checked out of the pool.
The default is 100.
min_pool_size: Option<u32>
The minimum number of connections that the pool can have at a given time. This includes
connections which are currently checked out of the pool. If fewer than min_pool_size
connections are in the pool, connections will be added to the pool in the background.
The default is that no minimum is enforced
Trait Implementations
sourceimpl Clone for ConnectionPoolOptions
impl Clone for ConnectionPoolOptions
sourcefn clone(&self) -> ConnectionPoolOptions
fn clone(&self) -> ConnectionPoolOptions
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more