pub struct RedisConfig { /* private fields */ }Expand description
Typed Redis connection and reconnect configuration.
Implementations§
Source§impl RedisConfig
impl RedisConfig
Sourcepub fn new(url: impl Into<String>) -> Self
pub fn new(url: impl Into<String>) -> Self
Creates secure, bounded Redis configuration from an explicit URL.
Sourcepub fn with_connection_timeout(self, timeout: Duration) -> Self
pub fn with_connection_timeout(self, timeout: Duration) -> Self
Sets the timeout for initial and reconnect attempts.
Sourcepub fn with_response_timeout(self, timeout: Duration) -> Self
pub fn with_response_timeout(self, timeout: Duration) -> Self
Sets the timeout for command responses.
Sourcepub fn with_shutdown_timeout(self, timeout: Duration) -> Self
pub fn with_shutdown_timeout(self, timeout: Duration) -> Self
Sets how long graceful shutdown waits for admitted operations.
Sourcepub fn with_reconnect_attempts(self, attempts: usize) -> Self
pub fn with_reconnect_attempts(self, attempts: usize) -> Self
Sets the maximum reconnect attempts performed by redis-rs.
Sourcepub fn with_reconnect_backoff(
self,
minimum: Duration,
maximum: Duration,
) -> Self
pub fn with_reconnect_backoff( self, minimum: Duration, maximum: Duration, ) -> Self
Sets minimum and maximum exponential reconnect delays.
Sourcepub fn with_concurrency_limit(self, limit: usize) -> Self
pub fn with_concurrency_limit(self, limit: usize) -> Self
Sets the maximum concurrent requests accepted by the connection manager.
Sourcepub fn with_pipeline_buffer_size(self, size: usize) -> Self
pub fn with_pipeline_buffer_size(self, size: usize) -> Self
Sets the bounded internal pipeline buffer size.
Sourcepub fn allow_plaintext_for_local_development(self) -> Self
pub fn allow_plaintext_for_local_development(self) -> Self
Explicitly permits redis:// only for a loopback development server.
Trait Implementations§
Source§impl Clone for RedisConfig
impl Clone for RedisConfig
Source§fn clone(&self) -> RedisConfig
fn clone(&self) -> RedisConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 RedisConfig
impl Debug for RedisConfig
impl Eq for RedisConfig
Source§impl PartialEq for RedisConfig
impl PartialEq for RedisConfig
impl StructuralPartialEq for RedisConfig
Auto Trait Implementations§
impl Freeze for RedisConfig
impl RefUnwindSafe for RedisConfig
impl Send for RedisConfig
impl Sync for RedisConfig
impl Unpin for RedisConfig
impl UnsafeUnpin for RedisConfig
impl UnwindSafe for RedisConfig
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