Enum reool::config::DefaultCommandTimeout [−][src]
pub enum DefaultCommandTimeout { Never, After(Duration), }
Expand description
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.
Wait for at most the given Duration
until a
Redis command has finished.
If elapsed abort (drop) the connection.
Tuple Fields of After
0: Duration
Implementations
Trait Implementations
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
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
Mutably borrows from an owned value. Read more