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
//! **What an invocation says, and with what exit code.**
//!
//! Split from [`super`] at the design-time budget on the seam the two already
//! have: [`super`] is what an invocation *decides*, and this is the shape of
//! what it hands back. They change for different reasons — a verb added moves
//! the match above, an outcome class added moves the constructors below — which
//! is the test that a seam is real.
/// Which stream a verdict's text belongs on.
///
/// It is stored rather than derived from the code, and the exception is the
/// reason. For everything this binary says about *itself* the code does say the
/// stream — a refusal is stderr, a `--version` is stdout. But the seat's one
/// product is the engine's **reply stream**, and an engine answering `ok:
/// false` has answered: that is the product, it goes to stdout with the rest of
/// the frames, and only the exit code says no. Deriving the stream from the
/// code would put an answer on stderr because it was a negative one.
/// What one invocation decided: an exit code, the text that explains it, and
/// where that text belongs.
/// **Where a refused caller is pointed.** One line, under the diagnosis: the
/// roster of every word, and the page for the one that was typed. It is not
/// the usage itself — see [`Verdict::refused`].
pub const POINTER: &str =
"`lernie help` lists every word; `lernie help <word>` is one word's page";
/// The exit code for every refusal: bad usage, or a body that is not a gesture.
/// One code, because these are all the same kind of event — "that is not
/// something this binary can act on" — and a taxonomy of exit codes would be a
/// promise to keep them stable.
pub const REFUSED: u8 = 2;
/// The exit code for a run that was understood and did not finish: no channel,
/// a channel that would not open, an engine that would not answer, or an engine
/// that answered no. One code for the same reason.
pub const FAILED: u8 = 1;