Enum reool::config::DefaultPoolCheckoutMode [−][src]
pub enum DefaultPoolCheckoutMode { Immediately, Wait, WaitAtMost(Duration), }
Expand description
Various options on retrieving a connection that can be applied if a user wants to use the pool defaults for retrieving a connection.
The default is to wait for 30ms.
This struct only slightly differs from CheckoutMode
: It lacks
the variant PoolDefault
since that variant would make no sense
as this enum describes the default behaviour of the pool.
This struct has the same behaviour as CheckoutMode
regarding its
From
implementations.
The default is to wait for 30ms.
Variants
Expect a connection to be returned immediately. If there is none available return an error immediately.
Wait until there is a connection.
Using this can be risky as connections are returned
when dropped. If the pool has no idle connections left while
none are returned a deadlock might occur. It is always safe to use
this mode if only the RedisPool
itself is used as a connection since
it will immediately return the used connection after each operation.
Wait for at most the given Duration
.
The amount of time waited will in the end not be really exact.
Tuple Fields of WaitAtMost
0: Duration
Trait Implementations
Performs the conversion.
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 DefaultPoolCheckoutMode
impl Send for DefaultPoolCheckoutMode
impl Sync for DefaultPoolCheckoutMode
impl Unpin for DefaultPoolCheckoutMode
impl UnwindSafe for DefaultPoolCheckoutMode
Blanket Implementations
Mutably borrows from an owned value. Read more