Enum reool::config::DefaultCommandTimeout[][src]

pub enum DefaultCommandTimeout {
    Never,
    After(Duration),
}

A timeout for commands which is applied to all commands on all connections.

This timeout is a default and can be overridden in several places to adjust the behaviour.

The default is to timeout after 1 minute.

FromStr

use reool::config::DefaultCommandTimeout;

let never: DefaultCommandTimeout = "never".parse().unwrap();
assert_eq!(never, DefaultCommandTimeout::Never);

let after100ms: DefaultCommandTimeout = "100".parse().unwrap();
assert_eq!(after100ms, DefaultCommandTimeout::After(Duration::from_millis(100)));

Variants

Never

Never time out.

This requires a timeout to be applied from externally unless it is guaranted that a connection is killed eventually.

After(Duration)

Wait for at most the given Duration until a Redis command has finished.

If elapsed abort (drop) the connection.

Implementations

impl DefaultCommandTimeout[src]

Trait Implementations

impl Clone for DefaultCommandTimeout[src]

impl Copy for DefaultCommandTimeout[src]

impl Debug for DefaultCommandTimeout[src]

impl Default for DefaultCommandTimeout[src]

impl Eq for DefaultCommandTimeout[src]

impl From<Duration> for DefaultCommandTimeout[src]

impl From<Millis> for DefaultCommandTimeout[src]

impl From<Seconds> for DefaultCommandTimeout[src]

impl From<Wait> for DefaultCommandTimeout[src]

impl FromStr for DefaultCommandTimeout[src]

type Err = ParseDefaultCommandTimeoutError

The associated error which can be returned from parsing.

impl PartialEq<DefaultCommandTimeout> for DefaultCommandTimeout[src]

impl StructuralEq for DefaultCommandTimeout[src]

impl StructuralPartialEq for DefaultCommandTimeout[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>,