Derive more traits for RpcError (#359)

Makes RpcError derive Clone, PartialEq, Eq, Hash, Serialize and Deserialize.
This commit is contained in:
David Kleingeld
2021-12-28 07:00:58 +01:00
committed by GitHub
parent eea38b8bf4
commit b5d593488c

View File

@@ -168,7 +168,8 @@ struct ResponseGuard<'a, Resp> {
/// An error that can occur in the processing of an RPC. This is not request-specific errors but
/// rather cross-cutting errors that can always occur.
#[derive(thiserror::Error, Debug)]
#[derive(thiserror::Error, Clone, Debug, PartialEq, Eq, Hash)]
#[cfg_attr(feature = "serde1", derive(serde::Serialize, serde::Deserialize))]
pub enum RpcError {
/// The client disconnected from the server.
#[error("the client disconnected from the server")]