pub struct PartialRedisConfigOptions {
pub max_connections: Option<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: Option<u32>
Maximum number of connections managed by the pool.
Defaults to 2x limits.max_thread_count
or a minimum of 24.
min_idle: Option<u32>
Minimum amount of idle connections kept alive in the pool.
If not set it will default to 20% of 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 PartialRedisConfigOptions
impl Clone for PartialRedisConfigOptions
source§fn clone(&self) -> PartialRedisConfigOptions
fn clone(&self) -> PartialRedisConfigOptions
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 PartialRedisConfigOptions
impl Debug for PartialRedisConfigOptions
source§impl Default for PartialRedisConfigOptions
impl Default for PartialRedisConfigOptions
source§impl<'de> Deserialize<'de> for PartialRedisConfigOptionswhere
PartialRedisConfigOptions: Default,
impl<'de> Deserialize<'de> for PartialRedisConfigOptionswhere
PartialRedisConfigOptions: 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
impl Eq for PartialRedisConfigOptions
impl StructuralPartialEq for PartialRedisConfigOptions
Auto Trait Implementations§
impl Freeze for PartialRedisConfigOptions
impl RefUnwindSafe for PartialRedisConfigOptions
impl Send for PartialRedisConfigOptions
impl Sync for PartialRedisConfigOptions
impl Unpin for PartialRedisConfigOptions
impl UnwindSafe for PartialRedisConfigOptions
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
Checks if this value is equivalent to the given key. Read more
§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