Struct mongodb::event::cmap::ConnectionPoolOptions [−][src]
#[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
Returns the “default value” for a type. Read more
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for ConnectionPoolOptions
impl Send for ConnectionPoolOptions
impl Sync for ConnectionPoolOptions
impl Unpin for ConnectionPoolOptions
impl UnwindSafe for ConnectionPoolOptions
Blanket Implementations
Mutably borrows from an owned value. Read more