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
//! The ingress edge (ingress.md): brazen accepting a request in a CLIENT dialect,
//! decoded to the canonical model at the input boundary — the mirror of the egress
//! `Protocol` adapters. An ingress dialect is a codec pair (ingress.md §2); this
//! module holds both codec halves (`decode_request` / `encode_response`) plus the
//! dialect dispatch, mirroring the egress registry pattern (arch §4.4): a TOTAL
//! match over the closed [`IngressId`] enum, so adding a dialect fails to compile
//! until its arm exists and an "unregistered dialect" is unrepresentable. The
//! shared encode state lives in [`state`]; the replay-stash re-injection (§5) is a
//! sibling capability that joins here later; nothing in this module does IO.
pub
pub use ;
pub use IngressState;
use crate;
/// The closed set of ingress dialects — the registry key, mirroring `ProtocolId`
/// (arch §4.4). A dialect is always named EXPLICITLY (the `--in` flag, or under
/// `--serve` the route path); structural sniffing stays forbidden (ingress.md §2).
/// The flag spellings of the closed dialect set — how `--in DIALECT` names an
/// [`IngressId`] (ingress.md §2, §11). `None` is the caller's error to class:
/// `--in` maps it to usage (64) — the vocabulary itself has one home. (Under
/// `--serve` the route path selects the codec, so no spelling is parsed, §8.)
pub
/// A `decode_request` failure. ALWAYS `ErrorKind::ParseInput` (ingress.md §2) — the
/// kind is a query over this type, never a stored field — framed in the CLIENT
/// dialect's error envelope at the edge (§9). `message` names the offending
/// key/shape, per the adapt-or-reject ladder's rung 4 (§3).
/// The one projection onto the canonical error model: an ingress rejection is
/// `ParseInput` by construction (ingress.md §2) with brazen as the origin — no
/// provider detail and no retry pacing, because no round-trip happened.
/// Client-dialect request bytes → the canonical request (ingress.md §2). Pure; the
/// dialect dispatches by a total match on the closed enum — the ingress mirror of
/// `Registry::protocol` (arch §4.4), never a match on a vendor name.
/// The canonical event stream → client-dialect response bytes (ingress.md §2):
/// pure, total (consumes every event including `Error`, §9), streaming-capable —
/// called once per event, emitting zero or more byte chunks (SSE frames, or the
/// `End`-rendered aggregate — the same fold on both shapes, §10). The dialect
/// dispatches by the same total match as [`decode_request`].