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
//! Error types returned by the converters.
use fmt;
/// Errors raised during conversion.
///
/// The conversion functions are fallible. Three conditions stop a conversion:
/// an input `type` value that is not a valid JSON Schema type, a root schema
/// that is neither an object nor an array, and a parameter with neither a
/// `schema` nor a `content` member while strict mode is on.
///
/// Match on the variant to branch on the cause. Each variant carries the full
/// message, which is also what [`Display`](std::fmt::Display) prints.