From 21a70ac8b944bceec4b42e3ccd5efa8106651a12 Mon Sep 17 00:00:00 2001 From: rmqtt Date: Sat, 4 Jun 2022 16:35:35 +0800 Subject: [PATCH] Add: Error::Elapsed and Error::Msg(...) --- src/error.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/error.rs b/src/error.rs index 57b3101..41bde97 100644 --- a/src/error.rs +++ b/src/error.rs @@ -22,6 +22,10 @@ pub enum Error { LeaderNotExist, #[error("protobuf error: `{0}`")] ProtobufError(#[from] protobuf::ProtobufError), + #[error("timeout")] + Elapsed, + #[error("{0}")] + Msg(String), } impl Error {