1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
use Error;
use crateKsSignerError;
/// Error values
// impl Display for KrError {
// fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
// match self {
// KrError::InceptionError => formatter.write_str("unexpected end of input"),
// KrError::DeserializeError(_) => formatter.write_str("unexpected end of input"),
// KrError::SemanticError(_) => formatter.write_str("unexpected end of input"),
// KrError::SolRpc(_) => todo!(),
// KrError::IncorrectDigest => todo!(),
// KrError::EventOutOfOrderError => todo!(),
// KrError::EventDuplicateError => todo!(),
// KrError::CoreErr(_) => todo!(),
// KrError::Base64DecodingError { source } => todo!(),
// KrError::SerdeJsonErr(_) => todo!(),
// KrError::SerdeCborErr(_) => todo!(),
// KrError::SerdeRmpErr(_) => todo!(),
// // Error::Message(msg) => formatter.write_str(msg),
// // Error::Eof => formatter.write_str("unexpected end of input"),
// // Error::Syntax => formatter.write_str("incorrect syntax"),
// // Error::ExpectedBoolean => formatter.write_str("incorrect input: expected boolean"),
// // Error::ExpectedInteger => formatter.write_str("incorrect input: expected integer"),
// // Error::ExpectedString => formatter.write_str("incorrect input: expected string"),
// // Error::ExpectedNull => formatter.write_str("incorrect input: expected null"),
// // Error::ExpectedArray => formatter.write_str("incorrect input: expected array"),
// // Error::ExpectedArrayComma => {
// // formatter.write_str("incorrect input: expected array comma")
// // }
// // Error::ExpectedArrayEnd => formatter.write_str("incorrect input: expected array end"),
// // Error::ExpectedMap => formatter.write_str("incorrect input: expected map"),
// // Error::ExpectedMapColon => formatter.write_str("incorrect input: expected map colon"),
// // Error::ExpectedMapComma => formatter.write_str("incorrect input: expected map comma"),
// // Error::ExpectedMapEnd => formatter.write_str("incorrect input: expected map end"),
// // Error::ExpectedEnum => formatter.write_str("incorrect input: expected enum"),
// // Error::TrailingCharacters => {
// // formatter.write_str("incorrect input: unexpected trailing characters")
// // }
// }
// }
// }
// impl ser::Error for KrError {
// fn custom<T: Display>(msg: T) -> Self {
// KrError::Message(msg.to_string())
// }
// }
// impl de::Error for KrError {
// fn custom<T: Display>(msg: T) -> Self {
// KrError::Message(msg.to_string())
// }
// }