#[non_exhaustive]pub enum Error {
ConnectionClosed,
Memcache(String),
UnexpectedResponse,
Protocol(ParseError),
Io(Error),
AllConnectionsFailed,
NoPending,
TooManyInFlight,
KeyTooLong,
ValueTooLong,
}Expand description
Errors returned by the ringline Memcache client.
Marked #[non_exhaustive] because the crate is still evolving and new
transport / protocol error kinds are expected. Downstream match
blocks must include a wildcard arm.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
ConnectionClosed
The connection was closed before a response was received.
Memcache(String)
The server returned an error response (ERROR, CLIENT_ERROR, SERVER_ERROR).
UnexpectedResponse
The response type did not match the expected type for the command.
Protocol(ParseError)
Memcache protocol parse error.
Io(Error)
I/O error during send.
AllConnectionsFailed
All connections in the pool are down and reconnection failed.
NoPending
recv() called with no pending fire operations.
TooManyInFlight
The in-flight pending-op queue reached max_in_flight. Drain via
recv() before issuing more fire_* calls. Configurable via
ClientBuilder::max_in_flight.
KeyTooLong
Key exceeds memcache’s 250-byte cap (MAX_KEY_LEN). The request
is rejected client-side instead of being transmitted; otherwise the
server would reply with CLIENT_ERROR after consuming pool /
pending-queue capacity for a doomed command.
ValueTooLong
Value exceeds memcache’s default -I 1 MiB cap (MAX_VALUE_LEN).
Same rationale as Error::KeyTooLong.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()