Enum reool::config::DefaultPoolCheckoutMode[][src]

pub enum DefaultPoolCheckoutMode {
    Immediately,
    Wait,
    WaitAtMost(Duration),
}

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

Immediately

Expect a connection to be returned immediately. If there is none available return an error immediately.

Wait

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.

WaitAtMost(Duration)

Wait for at most the given Duration.

The amount of time waited will in the end not be really exact.

Trait Implementations

impl Clone for DefaultPoolCheckoutMode[src]

impl Copy for DefaultPoolCheckoutMode[src]

impl Debug for DefaultPoolCheckoutMode[src]

impl Default for DefaultPoolCheckoutMode[src]

impl Eq for DefaultPoolCheckoutMode[src]

impl From<Duration> for DefaultPoolCheckoutMode[src]

impl From<Immediately> for DefaultPoolCheckoutMode[src]

impl From<Millis> for DefaultPoolCheckoutMode[src]

impl From<Seconds> for DefaultPoolCheckoutMode[src]

impl From<Wait> for DefaultPoolCheckoutMode[src]

impl FromStr for DefaultPoolCheckoutMode[src]

type Err = ParseDefaultPoolCheckoutModeError

The associated error which can be returned from parsing.

impl PartialEq<DefaultPoolCheckoutMode> for DefaultPoolCheckoutMode[src]

impl StructuralEq for DefaultPoolCheckoutMode[src]

impl StructuralPartialEq for DefaultPoolCheckoutMode[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,