Enum reool::config::DefaultCommandTimeout [−][src]
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 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]
pub fn to_duration_opt(self) -> Option<Duration>
[src]
Trait Implementations
impl Clone for DefaultCommandTimeout
[src]
fn clone(&self) -> DefaultCommandTimeout
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[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.
fn from_str(s: &str) -> Result<Self, Self::Err>
[src]
impl PartialEq<DefaultCommandTimeout> for DefaultCommandTimeout
[src]
fn eq(&self, other: &DefaultCommandTimeout) -> bool
[src]
fn ne(&self, other: &DefaultCommandTimeout) -> bool
[src]
impl StructuralEq for DefaultCommandTimeout
[src]
impl StructuralPartialEq for DefaultCommandTimeout
[src]
Auto Trait Implementations
impl RefUnwindSafe for DefaultCommandTimeout
impl Send for DefaultCommandTimeout
impl Sync for DefaultCommandTimeout
impl Unpin for DefaultCommandTimeout
impl UnwindSafe for DefaultCommandTimeout
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>,