pub struct RedisConfigOptions {
pub max_connections: u32,
pub min_idle: Option<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.
min_idle: Option<u32>
Minimum amount of idle connections kept alive in the pool.
If not set it will default to Self::max_connections
.
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 RedisConfigOptions
impl<'de> Deserialize<'de> for RedisConfigOptions
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§impl Serialize for RedisConfigOptions
impl Serialize for RedisConfigOptions
impl Eq for RedisConfigOptions
impl StructuralPartialEq for RedisConfigOptions
Auto Trait Implementations§
impl Freeze for RedisConfigOptions
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more