pub enum Error<S, Q> {
Connection(S),
Query(Q),
ConnectionNotFound(ConnectionHandle),
QueryNotFound(QueryHandle),
InvalidOpcode(Opcode),
InvalidResponseCode(ResponseCode),
TrancatedQuery,
Proto(ProtoError),
}Expand description
The error type for the server.
Variants§
Connection(S)
The server is full and cannot hold any more connections.
Query(Q)
The connection is full and cannot hold any more queries.
ConnectionNotFound(ConnectionHandle)
The connection is not found.
QueryNotFound(QueryHandle)
The query is not found.
InvalidOpcode(Opcode)
Returned when the a query has an invalid opcode.
InvalidResponseCode(ResponseCode)
Returned when the a query has an invalid response code.
TrancatedQuery
Returned when a query with a high truncated bit is received.
Proto(ProtoError)
Protocol error
Trait Implementations§
Source§impl<S, Q> Error for Error<S, Q>
impl<S, Q> Error for Error<S, Q>
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Auto Trait Implementations§
impl<S, Q> Freeze for Error<S, Q>
impl<S, Q> RefUnwindSafe for Error<S, Q>where
S: RefUnwindSafe,
Q: RefUnwindSafe,
impl<S, Q> Send for Error<S, Q>
impl<S, Q> Sync for Error<S, Q>
impl<S, Q> Unpin for Error<S, Q>
impl<S, Q> UnwindSafe for Error<S, Q>where
S: UnwindSafe,
Q: UnwindSafe,
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
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>
Converts
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>
Converts
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