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.
Trait Implementations§
impl Copy for GetMode
impl Eq for GetMode
impl StructuralPartialEq for GetMode
Auto Trait Implementations§
impl Freeze for GetMode
impl RefUnwindSafe for GetMode
impl Send for GetMode
impl Sync for GetMode
impl Unpin for GetMode
impl UnwindSafe for GetMode
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