Struct relay_redis::RedisConfigOptions
source · pub struct RedisConfigOptions {
pub max_connections: u32,
pub connection_timeout: u64,
pub max_lifetime: u64,
pub idle_timeout: u64,
pub read_timeout: u64,
pub write_timeout: u64,
}
Expand description
Additional configuration options for a redis client.
Fields§
§max_connections: u32
Maximum number of connections managed by the pool.
connection_timeout: u64
Sets the connection timeout used by the pool, in seconds.
Calls to Pool::get
will wait this long for a connection to become available before returning an error.
max_lifetime: u64
Sets the maximum lifetime of connections in the pool, in seconds.
idle_timeout: u64
Sets the idle timeout used by the pool, in seconds.
read_timeout: u64
Sets the read timeout out on the connection, in seconds.
write_timeout: u64
Sets the write timeout on the connection, in seconds.
Trait Implementations§
source§impl Clone for RedisConfigOptions
impl Clone for RedisConfigOptions
source§fn clone(&self) -> RedisConfigOptions
fn clone(&self) -> RedisConfigOptions
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for RedisConfigOptions
impl Debug for RedisConfigOptions
source§impl Default for RedisConfigOptions
impl Default for RedisConfigOptions
source§impl<'de> Deserialize<'de> for RedisConfigOptionswhere
RedisConfigOptions: Default,
impl<'de> Deserialize<'de> for RedisConfigOptionswhere
RedisConfigOptions: Default,
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq for RedisConfigOptions
impl PartialEq for RedisConfigOptions
source§fn eq(&self, other: &RedisConfigOptions) -> bool
fn eq(&self, other: &RedisConfigOptions) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for RedisConfigOptions
impl Serialize for RedisConfigOptions
impl Eq for RedisConfigOptions
impl StructuralPartialEq for RedisConfigOptions
Auto Trait Implementations§
impl RefUnwindSafe for RedisConfigOptions
impl Send for RedisConfigOptions
impl Sync for RedisConfigOptions
impl Unpin for RedisConfigOptions
impl UnwindSafe for RedisConfigOptions
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more