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

Never time out.

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

After

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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

The associated error which can be returned from parsing.

Parses a string s to return a value of this type. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.