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
use crate::AnErr;
#[non_exhaustive]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum DtErrKind {
/// Format string or input ended unexpectedly (%, ., exhausted input, etc.)
UnexpectedEnd,
/// Unknown % directive (the `_` case)
UnknownDirective,
/// %c, %r, %X, %x, %Z etc. (explicitly unsupported library directives)
UnsupportedDirective,
/// The `.` was followed by something other than f/N
BadFractional,
/// Literal character or % sign in input didn't match format
MismatchedLiteral,
/// Generic "could not parse expected integer" (year, month, day, hour, …)
ExpectedValue,
/// Month name, weekday name, or AM/PM failed to parse
InvalidName,
/// Anything wrong with a timezone offset (+HH:MM:SS syntax)
InvalidTimezoneOffset,
/// %L scale parsing failed
InvalidScale,
/// Generic must start with
MustStartWith,
/// Any failure to parse a number, integer, or fractional part
/// (no digits, parse::<i64> failed, bad UTF-8, empty fraction, too many decimals, etc.)
InvalidNumber,
InvalidItem,
InvalidBytes,
InvalidSyntax,
FormatterErr,
OutOfRange,
TrailingCharacters,
Incomplete,
InvalidInput,
CCSDSInputErr,
CCSDSOutputErr,
InternalErr,
IOErr,
JiffConversion,
ChronoConversion,
}
pub type DtErr = AnErr<DtErrKind, 3, 29>;