pub enum ReconnectBehavior {
NoReconnect,
InstantRetry,
RetryWaitRetry(Option<Duration>),
}Expand description
To change the default behavior of the pool on network/io error.
Variants§
NoReconnect
Will just return a RedisError, and the entire connection pool will not work after a disconnection, you should probably not use this
InstantRetry
This is the default one, on error it will drop the previous connection and create a new one instantly, then retry the redis command, if it keeps failing, then it will just return a RedisError
RetryWaitRetry(Option<Duration>)
Try to reconnect, but on fail, it will wait (2 seconds by default), then try again, if it keeps failing, then return a RedisError
Trait Implementations§
Source§impl Clone for ReconnectBehavior
impl Clone for ReconnectBehavior
Source§fn clone(&self) -> ReconnectBehavior
fn clone(&self) -> ReconnectBehavior
Returns a duplicate 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 ReconnectBehavior
impl Debug for ReconnectBehavior
Source§impl Default for ReconnectBehavior
impl Default for ReconnectBehavior
Source§impl PartialEq for ReconnectBehavior
impl PartialEq for ReconnectBehavior
impl Copy for ReconnectBehavior
impl StructuralPartialEq for ReconnectBehavior
Auto Trait Implementations§
impl Freeze for ReconnectBehavior
impl RefUnwindSafe for ReconnectBehavior
impl Send for ReconnectBehavior
impl Sync for ReconnectBehavior
impl Unpin for ReconnectBehavior
impl UnwindSafe for ReconnectBehavior
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