Enum reool::CheckoutMode [−][src]
Various options on retrieving a connection
Special From
implementations
Duration
:Until
with a deadline from now until the durations elapsed.Instant
:Until
the given instant.
Variants
Expect a connection to be returned immediately.
If there is none available return an error immediately.
In that case a CheckoutErrorKind::NoConnection
will be returned
This mode will always try to get a connection
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.
Use the default configured for the pool
Until(Instant)
Checkout before the given Instant
is elapsed. If the given timeout is
elapsed, no attempt to checkout a connection will be made.
In that case a CheckoutErrorKind::CheckoutTimeout
will be returned.
Implementations
impl CheckoutMode
[src]
pub fn is_deadline_elapsed(self) -> bool
[src]
Trait Implementations
impl Clone for CheckoutMode
[src]
fn clone(&self) -> CheckoutMode
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for CheckoutMode
[src]
impl Debug for CheckoutMode
[src]
impl Default for CheckoutMode
[src]
impl Eq for CheckoutMode
[src]
impl From<Duration> for CheckoutMode
[src]
impl From<Immediately> for CheckoutMode
[src]
fn from(_: Immediately) -> Self
[src]
impl From<Instant> for CheckoutMode
[src]
impl From<Millis> for CheckoutMode
[src]
impl From<PoolDefault> for CheckoutMode
[src]
fn from(_: PoolDefault) -> Self
[src]
impl From<Seconds> for CheckoutMode
[src]
impl From<Wait> for CheckoutMode
[src]
impl PartialEq<CheckoutMode> for CheckoutMode
[src]
fn eq(&self, other: &CheckoutMode) -> bool
[src]
fn ne(&self, other: &CheckoutMode) -> bool
[src]
impl StructuralEq for CheckoutMode
[src]
impl StructuralPartialEq for CheckoutMode
[src]
Auto Trait Implementations
impl RefUnwindSafe for CheckoutMode
impl Send for CheckoutMode
impl Sync for CheckoutMode
impl Unpin for CheckoutMode
impl UnwindSafe for CheckoutMode
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>,