aboutsummaryrefslogtreecommitdiff
path: root/src/util/error.rs
diff options
context:
space:
mode:
authorTrinity Pointard <trinity.pointard@gmail.com>2021-05-02 23:13:08 +0200
committerAlex Auvolat <alex@adnab.me>2021-05-03 22:15:09 +0200
commite4b9e4e24d006373a20cfcbdac9dba5e399ee182 (patch)
tree620e24d182e6db4ad7ddca274eb8071d8241a1d6 /src/util/error.rs
parent6644df6b969df3f7ff0516ab7acd9b600dff0a54 (diff)
downloadgarage-e4b9e4e24d006373a20cfcbdac9dba5e399ee182.tar.gz
garage-e4b9e4e24d006373a20cfcbdac9dba5e399ee182.zip
rename types to CamelCase
Diffstat (limited to 'src/util/error.rs')
-rw-r--r--src/util/error.rs28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/util/error.rs b/src/util/error.rs
index 2b862269..c3d84e63 100644
--- a/src/util/error.rs
+++ b/src/util/error.rs
@@ -7,24 +7,24 @@ use crate::data::*;
/// RPC related errors
#[derive(Debug, Error)]
-pub enum RPCError {
+pub enum RpcError {
#[error(display = "Node is down: {:?}.", _0)]
- NodeDown(UUID),
+ NodeDown(Uuid),
#[error(display = "Timeout: {}", _0)]
Timeout(#[error(source)] tokio::time::error::Elapsed),
#[error(display = "HTTP error: {}", _0)]
- HTTP(#[error(source)] http::Error),
+ Http(#[error(source)] http::Error),
#[error(display = "Hyper error: {}", _0)]
Hyper(#[error(source)] hyper::Error),
#[error(display = "Messagepack encode error: {}", _0)]
- RMPEncode(#[error(source)] rmp_serde::encode::Error),
+ RmpEncode(#[error(source)] rmp_serde::encode::Error),
#[error(display = "Messagepack decode error: {}", _0)]
- RMPDecode(#[error(source)] rmp_serde::decode::Error),
+ RmpDecode(#[error(source)] rmp_serde::decode::Error),
#[error(display = "Too many errors: {:?}", _0)]
TooManyErrors(Vec<String>),
@@ -40,26 +40,26 @@ pub enum Error {
Hyper(#[error(source)] hyper::Error),
#[error(display = "HTTP error: {}", _0)]
- HTTP(#[error(source)] http::Error),
+ Http(#[error(source)] http::Error),
#[error(display = "Invalid HTTP header value: {}", _0)]
- HTTPHeader(#[error(source)] http::header::ToStrError),
+ HttpHeader(#[error(source)] http::header::ToStrError),
#[error(display = "TLS error: {}", _0)]
- TLS(#[error(source)] rustls::TLSError),
+ Tls(#[error(source)] rustls::TLSError),
#[error(display = "PKI error: {}", _0)]
- PKI(#[error(source)] webpki::Error),
+ Pki(#[error(source)] webpki::Error),
#[error(display = "Sled error: {}", _0)]
Sled(#[error(source)] sled::Error),
#[error(display = "Messagepack encode error: {}", _0)]
- RMPEncode(#[error(source)] rmp_serde::encode::Error),
+ RmpEncode(#[error(source)] rmp_serde::encode::Error),
#[error(display = "Messagepack decode error: {}", _0)]
- RMPDecode(#[error(source)] rmp_serde::decode::Error),
+ RmpDecode(#[error(source)] rmp_serde::decode::Error),
#[error(display = "JSON error: {}", _0)]
- JSON(#[error(source)] serde_json::error::Error),
+ Json(#[error(source)] serde_json::error::Error),
#[error(display = "TOML decode error: {}", _0)]
TomlDecode(#[error(source)] toml::de::Error),
@@ -67,13 +67,13 @@ pub enum Error {
TokioJoin(#[error(source)] tokio::task::JoinError),
#[error(display = "RPC call error: {}", _0)]
- RPC(#[error(source)] RPCError),
+ Rpc(#[error(source)] RpcError),
#[error(display = "Remote error: {} (status code {})", _0, _1)]
RemoteError(String, StatusCode),
#[error(display = "Bad RPC: {}", _0)]
- BadRPC(String),
+ BadRpc(String),
#[error(display = "Corrupt data: does not match hash {:?}", _0)]
CorruptData(Hash),