pub enum MigrationRedirect {
None,
Moved {
slot: u16,
addr: SocketAddr,
},
Ask {
slot: u16,
addr: SocketAddr,
},
}Expand description
Result of checking whether a command should be redirected during migration.
Variants§
None
No redirect needed, handle locally.
Moved
Send MOVED redirect (slot permanently moved).
Ask
Send ASK redirect (slot temporarily at another node).
Implementations§
Source§impl MigrationRedirect
impl MigrationRedirect
Sourcepub fn to_error_string(&self) -> Option<String>
pub fn to_error_string(&self) -> Option<String>
Format as RESP error string.
Trait Implementations§
Source§impl Clone for MigrationRedirect
impl Clone for MigrationRedirect
Source§fn clone(&self) -> MigrationRedirect
fn clone(&self) -> MigrationRedirect
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 MigrationRedirect
impl Debug for MigrationRedirect
Source§impl PartialEq for MigrationRedirect
impl PartialEq for MigrationRedirect
impl Eq for MigrationRedirect
impl StructuralPartialEq for MigrationRedirect
Auto Trait Implementations§
impl Freeze for MigrationRedirect
impl RefUnwindSafe for MigrationRedirect
impl Send for MigrationRedirect
impl Sync for MigrationRedirect
impl Unpin for MigrationRedirect
impl UnsafeUnpin for MigrationRedirect
impl UnwindSafe for MigrationRedirect
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