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
/// Diagnostic levels
///
/// ## Default
///
/// [`Level`] implements [`Default`], which will return `Level::Missing`.
///
/// ```rust
/// use mock_http_connector::Level;
///
/// assert_eq!(Level::default(), Level::Missing);
/// ```
///
/// ## Ordering
///
/// [`Level`] implements [`PartialOrd`] and [`Ord`] to facilitates comparing two [`Level`]s to
/// know which one is more verbose. The one with a greater value will be more verbose than the
/// other.
///
/// ```rust
/// use mock_http_connector::Level;
///
/// assert!(Level::Error < Level::Missing);
/// assert!(Level::None < Level::Error);
/// assert_eq!(Level::Missing, Level::Missing);
/// ```
///
/// ## Internal value guarantees
///
/// This enum implements [`PartialOrd`] and [`Ord`] through an internal representation as `u8`.
/// However, there is no guarantees that the actual integer values for each enum variants will
/// stay consistent from version to version.
///
/// If you want to compare a [`Level`] to a certain value, you should always compare it to a
/// [`Level`] and not to an integer.