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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
//! The arrangement layer: the composable unit-DAG expressed as data.
//!
//! The **pure model** owns the graph as data — opaque [`NodeId`]/[`EdgeId`], a
//! typed [`GraphBuilder`] whose `edge` bound is the compile-time guard, and a
//! [`validate`](GraphBuilder::validate) that topo-sorts the declared edges into
//! *derived* layers (as many as the topology implies, no fixed tiers).
//!
//! Declaring a topology and checking it is the whole of what happens here.
//! Nothing in this module opens a channel, spawns a driver or observes a fate —
//! the execution engine that does is not in this crate — which is why the layer
//! names no async runtime and carries no feature.
//!
//! # What this layer does NOT yet carry — the large-stream prerequisites
//!
//! The wiring here is proven for pipelines whose units process a whole item per call and buffer
//! their emissions. A pipeline over long media streams (a two-hour mp4 demuxed to packets) needs
//! four things that are named and OPEN, not built. They are listed so nobody reads the shipped
//! machinery as readiness for that shape:
//!
//! 1. **A streaming execution contract — the FACES and the LANE are built; the WORD is not.**
//! Demux/decode cannot ride the buffered [`Emitter`](crate::Emitter) / `Dispatch` shape: one call
//! producing millions of packets holds all of them before the driver drains. What replaces it
//! shipped as [`StreamOperator`](crate::StreamOperator) /
//! [`AsyncStreamOperator`](crate::AsyncStreamOperator) — one delivery's whole life, streamed
//! through a bounded [`Feed`](crate::Feed) — and [`StreamLane`](crate::StreamLane) is what drives
//! them: a run per delivery, the node's in-flight count bounded, the fed items projected into the
//! downstream set. What is still open is the DECLARATION WORD that would mount one, so a
//! deployment reaches the lane by building it. It is orthogonal to subscription — a source's
//! options and a unit's execution contract are different axes — so subscription sits on both
//! shapes unchanged.
//! 2. **A typed fork out of one unit — OPEN, with a recorded candidate and no commitment.** A
//! demuxer emits five differently-typed track kinds (video, audio, subtitle, data, attachment)
//! from ONE input file, so the fork is inside the pipeline and cannot be expressed by
//! subscribing twice: a single file is one subscription and one content root. Today an edge
//! carries exactly one message type, so no edge kind and no `SubscribeOptions` value can spell
//! this. The recorded candidate is a typed PORT — the subscribe shape one level down:
//!
//! ```text
//! trait Emits<Port> { type Item; type SubscribeOptions; }
//! ```
//!
//! with the compiler tying a consumer's input to `<U as Emits<P>>::Item` exactly as `subscribe`
//! ties it to `S::Output`. It is written down as a candidate and nothing more. The one open
//! variable is the COST of the alternatives — a broadcast sum sends every packet down all five
//! arms and discards four fifths of them on the hottest path there is — and that is measurable
//! only against a real demuxer, so the decision belongs with the first one, not here.
//! 3. **A seek-capable reader is the pipeline's to name.** Nothing in this crate names a reader,
//! a byte source, or a decoder at all, so a media pipeline puts `Seek` on ITS own reader type
//! at ITS own units (moov-at-end needs it). Free today precisely because there is no framework
//! reader to compose with.
//! 4. **One-shot streams are the SOURCE's to spool.** A non-re-openable stream (an upload body, a
//! pipe) must be spooled by the source before it emits, because nothing downstream can rewind
//! it.
pub use ;
pub use ;
pub use ChannelGraph;
/// An opaque handle to a declared node (its index in declaration order).
;
/// An opaque handle to a declared edge (its index in declaration order).
;
/// Which driver runs a node.
/// How a producer's output edge reaches its consumer(s). Semantic, per-edge data — the
/// runtime derives delivery from it.