From e4338a9d9d0a76029bca376c2bcb499962575e87 Mon Sep 17 00:00:00 2001 From: Max Audron Date: Thu, 27 Feb 2025 01:03:29 +0100 Subject: extend docs and reorganize files --- src/error/mod.rs | 45 --------------------------------------------- 1 file changed, 45 deletions(-) delete mode 100644 src/error/mod.rs (limited to 'src/error/mod.rs') diff --git a/src/error/mod.rs b/src/error/mod.rs deleted file mode 100644 index 7414062..0000000 --- a/src/error/mod.rs +++ /dev/null @@ -1,45 +0,0 @@ -use thiserror::Error; - -#[derive(Debug, Error)] -pub enum ProtocolError { - #[error("message has wrong type")] - WrongMsgType, - #[error("bool value is neither 0 nor 1")] - BoolOutOfRange, - #[error("QVariant is not known")] - UnknownVariant, - #[error("UserType is not known: {0}")] - UnknownUserType(String), - #[error("wrong variant has been given")] - WrongVariant, - #[error("io error: {0}")] - IOError(#[from] std::io::Error), - #[error("could not convert from int: {0}")] - TryFromIntError(#[from] std::num::TryFromIntError), - #[error("utf8 error: {0}")] - Utf8Error(#[from] std::string::FromUtf8Error), - #[error("errored to parse char as utf16")] - CharError, - #[error("failed to deal with time: {0}")] - TimeError(#[from] time::error::ComponentRange), -} - -// impl std::error::Error for ErrorKind {} -// -// impl std::convert::From for ErrorKind { -// fn from(error: std::io::Error) -> Self { -// ErrorKind::IOError(error) -// } -// } -// -// impl std::convert::From for ErrorKind { -// fn from(error: std::num::TryFromIntError) -> Self { -// ErrorKind::TryFromIntError(error) -// } -// } -// -// impl std::convert::From for ErrorKind { -// fn from(error: std::string::FromUtf8Error) -> Self { -// ErrorKind::Utf8Error(error) -// } -// } -- cgit v1.2.3