diff options
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)) } |