From b5d593488c5affef6d467d768331fd4ab8976ecd Mon Sep 17 00:00:00 2001 From: David Kleingeld Date: Tue, 28 Dec 2021 07:00:58 +0100 Subject: [PATCH] Derive more traits for RpcError (#359) Makes RpcError derive Clone, PartialEq, Eq, Hash, Serialize and Deserialize. --- tarpc/src/client.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tarpc/src/client.rs b/tarpc/src/client.rs index 15c943d..aa603db 100644 --- a/tarpc/src/client.rs +++ b/tarpc/src/client.rs @@ -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")]