pub struct RedirectHandler { /* private fields */ }Expand description
Helper to handle MOVED and ASK redirects
Implementations§
Source§impl RedirectHandler
 
impl RedirectHandler
Sourcepub fn new(topology: ClusterTopology, max_redirects: usize) -> Self
 
pub fn new(topology: ClusterTopology, max_redirects: usize) -> Self
Create a new redirect handler
Sourcepub async fn handle_redirect(
    &self,
    error: &RedisError,
) -> RedisResult<(String, u16, bool)>
 
pub async fn handle_redirect( &self, error: &RedisError, ) -> RedisResult<(String, u16, bool)>
Handle a redirect error and update topology
Sourcepub fn max_redirects(&self) -> usize
 
pub fn max_redirects(&self) -> usize
Get max redirects allowed
Trait Implementations§
Source§impl Clone for RedirectHandler
 
impl Clone for RedirectHandler
Source§fn clone(&self) -> RedirectHandler
 
fn clone(&self) -> RedirectHandler
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 moreAuto Trait Implementations§
impl Freeze for RedirectHandler
impl !RefUnwindSafe for RedirectHandler
impl Send for RedirectHandler
impl Sync for RedirectHandler
impl Unpin for RedirectHandler
impl !UnwindSafe for RedirectHandler
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