diff options
author | SoniEx2 <endermoneymod@gmail.com> | 2023-04-08 22:30:45 -0300 |
---|---|---|
committer | SoniEx2 <endermoneymod@gmail.com> | 2023-04-08 22:30:45 -0300 |
commit | 5693d84c79c5a460582f8c1563889970471eebf4 (patch) | |
tree | a37d791b2e45b50986e13eac07c21fcaa6e474f8 /src/errors.rs | |
parent | 41254c58c9fface69f7db39b5236a7aed319047c (diff) |
More clean up
Diffstat (limited to 'src/errors.rs')
-rw-r--r-- | src/errors.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/errors.rs b/src/errors.rs index ea1e60d..2c8b2e5 100644 --- a/src/errors.rs +++ b/src/errors.rs @@ -57,21 +57,21 @@ pub enum MatchError { Unsatisfiable, } +/// Error returned while unwrapping a `Graph`. #[derive(Debug)] #[non_exhaustive] -pub enum QueryError { +pub enum UnpackError { /// Returned if the deserialization recurses too deeply. StackOverflow, /// Returned if there's nothing to deserialize. Empty, - /// The query is unsatisfiable. This happens if e.g. there are multiple - /// values in the query but only one value can fit into the request. + /// The packed data is incompatible with the data structure. Unsatisfiable, /// Wrapped Serde error. Serde(serde::de::value::Error), } -impl std::fmt::Display for QueryError { +impl std::fmt::Display for UnpackError { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { Self::StackOverflow => write!(f, "stack overflow"), @@ -82,10 +82,10 @@ impl std::fmt::Display for QueryError { } } -impl std::error::Error for QueryError { +impl std::error::Error for UnpackError { } -impl serde::de::Error for QueryError { +impl serde::de::Error for UnpackError { fn custom<T>(msg: T) -> Self where T: std::fmt::Display { Self::Serde(serde::de::value::Error::custom(msg)) } |