pub enum CommandErrors {
Timeout,
EncodingCommandFailed,
ProtocolViolation,
InvalidFuture,
TcpError,
TimerError,
CommandResponseViolation,
ErrorResponse(String),
MemoryFull,
}
Expand description
Error handling for command execution
Variants§
Timeout
No response within expected time frame Is recommended to create a new client/connection in this case.
EncodingCommandFailed
Failed encoding TX command
ProtocolViolation
Received an invalid response violating the RESP protocol. Ideally this should never happen. The following causes are conceivable
- Bug in this library (e.g. incomplete implementation of RESP protocol)
- Redis server bug
- Network failure. As we are using TCP, only a network stack bug or other exotic causes (e.g. bit flip) is reasonable.
- Is recommended to create a new client/connection in this case*.
InvalidFuture
Future is no longer valid. This happens on fatal problems like timeouts or faulty responses, on which message<->future mapping can no longer be guaranteed Is recommended to create a new client/connection in this case.
TcpError
Low level network error
TimerError
Upstream timer/clock failure
CommandResponseViolation
Received an unexpected response incompatible with the command specification
ErrorResponse(String)
Redis error response. Inner value is the error message received.
MemoryFull
Memory limit reached. s. MemoryParameter Is recommended to create a new client/connection in this case.
Trait Implementations§
Source§impl Clone for CommandErrors
impl Clone for CommandErrors
Source§fn clone(&self) -> CommandErrors
fn clone(&self) -> CommandErrors
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for CommandErrors
impl Debug for CommandErrors
Source§impl PartialEq for CommandErrors
impl PartialEq for CommandErrors
impl Eq for CommandErrors
impl StructuralPartialEq for CommandErrors
Auto Trait Implementations§
impl Freeze for CommandErrors
impl RefUnwindSafe for CommandErrors
impl Send for CommandErrors
impl Sync for CommandErrors
impl Unpin for CommandErrors
impl UnwindSafe for CommandErrors
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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>
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>
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