1#[derive(Clone, Debug, Eq, Hash, PartialEq, thiserror::Error)]
3pub enum Error {
4 #[error("Invalid value, expected under , found {0}")]
5 ValueOutOfRange(u64),
6 #[error("Invalid length, expected 7, found {0}")]
7 InvalidLength(usize),
8 #[error("Invalid character, alphanumeric expected, found {character} at {index}")]
9 InvalidCharacter { character: char, index: usize },
10 #[deprecated(
11 since = "0.8.0",
12 note = "The ParseInteger has been renamed. Use ValueOfRange instead."
13 )]
14 #[error("Invalid integer value: epected under {expected}, found {found}.")]
15 ParseInteger { expected: u64, found: u64 },
16 #[deprecated(
17 since = "0.8.0",
18 note = "The ParseLength has been renamed. Use InvalidLength instead."
19 )]
20 #[error(
21 "Invalid length: expected {expected_without_delimiter} or {expected_with_delimiter:?}, found {found}"
22 )]
23 ParseLength {
24 expected_without_delimiter: usize,
25 expected_with_delimiter: Option<usize>,
26 found: usize,
27 },
28}