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
108
109
110
111
112
113
114
115
116
//! The absence vocabulary every domain below shares.
//!
//! [`Asked`] carries one distinction and nothing else: was the question put?
//! It is here rather than in a domain file because every domain needs it and
//! none of them owns it — a `topic` field and a `doctor` field must spell
//! "not asked" the same way or the RFC 09 §5.1 O4 split is only local.
//!
//! [`u64_is_zero`] keeps company with it for the same reason: it is the
//! `skip_serializing_if` predicate behind "absent at zero", the append rule
//! that lets a counter be added to a shipped document without changing it
//! for consumers who never see the counter fire.
use Serialize;
/// "Was the question even put?" — the RFC 09 §5.1 O4 split (#246 / P1),
/// made nominal (RFC 13, v1.24).
///
/// A generation of report fields spelled "not asked" as `Option::None`,
/// which conflated it with every *other* absence the moment a field also had
/// an asked-but-absent reading. This type carries exactly the not-asked
/// distinction and nothing else:
///
/// * [`Asked::NotAsked`] — the flag was not passed, the sweep was not made,
/// the question does not exist for this subject. On the wire it is
/// **absence** (the field carries `skip_serializing_if` +
/// `default`), byte-identical to the `Option` it replaced.
/// * [`Asked::Asked`] — the question was put; the payload is the answer,
/// serialized transparently (again exactly as `Some` did).
///
/// The split is the point: a field whose `None` means *asked and nothing
/// was there* (an unstamped sample's age, a producer with no served slice)
/// **stays `Option`** — wrapping it here would re-conflate in the other
/// direction.
/// `Option`'s not-asked reading, named: `None` → `NotAsked`, `Some` →
/// `Asked` — the mechanical migration step for gated facts built with
/// `flag.then(...)`.
/// `skip_serializing_if` helper: a zero here is "nothing dropped", which the
/// absent field already says.
pub