Enum reool::config::DefaultPoolCheckoutMode [−][src]
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.
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]
fn clone(&self) -> DefaultPoolCheckoutMode
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[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]
fn from(_: Immediately) -> Self
[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.
fn from_str(s: &str) -> Result<Self, Self::Err>
[src]
impl PartialEq<DefaultPoolCheckoutMode> for DefaultPoolCheckoutMode
[src]
fn eq(&self, other: &DefaultPoolCheckoutMode) -> bool
[src]
fn ne(&self, other: &DefaultPoolCheckoutMode) -> bool
[src]
impl StructuralEq for DefaultPoolCheckoutMode
[src]
impl StructuralPartialEq for DefaultPoolCheckoutMode
[src]
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
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,