We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 64afd63 commit 8679191Copy full SHA for 8679191
src/error.rs
@@ -50,6 +50,11 @@ pub enum ErrorKind {
50
/// The kind of error that occurred.
51
kind: ValueAccessErrorKind,
52
},
53
+
54
+ /// A wrapped deserialization error.
55
+ /// TODO RUST-1406: collapse this
56
+ #[error("Deserialization error")]
57
+ DeError(crate::de::Error),
58
}
59
60
impl From<ErrorKind> for Error {
@@ -62,6 +67,16 @@ impl From<ErrorKind> for Error {
62
67
63
68
64
69
70
+impl From<crate::de::Error> for Error {
71
+ fn from(value: crate::de::Error) -> Self {
72
+ Self {
73
+ kind: ErrorKind::DeError(value),
74
+ key: None,
75
+ index: None,
76
+ }
77
78
+}
79
65
80
/// The types of errors that can occur when attempting to access a value in a document.
66
81
#[derive(Debug, Error)]
82
#[non_exhaustive]
0 commit comments