pub enum GetMode {
Wait,
NoWait,
ForceGet,
TimedWait(Duration),
}
Expand description
The mode to use when getting connections from a connection pool
Variants§
Wait
The caller should block until a connection is available from the pool.
NoWait
The caller should return immediately, regardless of whether a connection is available in the pool. If a connection is not available an error is returned.
ForceGet
A new connection should be created if
all of the connections in the pool are busy, even if
this exceeds the maximum connections allowable for
the connection pool (see PoolBuilder::max_connections
)
TimedWait(Duration)
The caller should block until a connection is available from the pool, but only for the specified length of time defined in the tuple field. If a connection is not available within the specified period of time an error is returned.